| Subject: Re: [xsl] trying to create a node-set of attribute nodes From: Ankit Jain <Ankit.Jain@xxxxxxxxxxx> Date: Mon, 10 Mar 2003 16:46:16 +0100 | 
Hello,
I too have a similar problem :
<xsl:template match="Annotation/@type[. = 'interesting']">
   <DIV style="background:Yellow">
   <font face="Arial" color="RED">
      <xsl:apply-imports/>
   </font>
   </DIV>
</xsl:template>
I would like to apply tempplate to all <Annotation> tags which have their
"type" attribute value="interesting".
But it doesnot work out.
Can u please tell what is the problem.
Thanks in advance,
Ankit
Jeni Tennison a écrit :
> Hi Robert,
>
> >   eg., if i wanted all attribute nodes with name "key", that's
> > just
> >
> >   //@key
> >
> > but what if i want attr nodes where key is specifically equal to
> > "F"? i'm assuming that requires a predicate, but i've tested several
> > variations and none work. how do i ask if the string-value is equal
> > to "F"?
>
> Get the string value of the context node (the attribute) with the
> string() function:
>
>   //@key[string(.) = "F"]
>
> or just use . and let the processor do the conversion of the attribute
> node to a string implicitly:
>
>   //@key[. = "F"]
>
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
--
Groupe Raisonnement, Action et Acte de Langage
IRIT-UMR-E.N.S.E.E.I.H.T.
2 rue Charles Camichel,
Toulouse, France.
Tel: +33 (0)5.61.58.82.00 extn : 8534
Fax: +33 (0)5.61.58.83.06
E-mail: Ankit.Jain@xxxxxxxxxxx
http://www.enseeiht.fr/lima/ia/
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] trying to create a node-s, Robert P. J. Day | Thread | Re: [xsl] trying to create a node-s, Jeni Tennison | 
| [xsl] Get Position of Node in Ances, Ted Stresen-Reuter | Date | [xsl] Xpath patern question, Hélder Sousa | 
| Month |