You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Richard Bolen <bo...@GretagMacbeth.com> on 2002/08/15 20:27:34 UTC

beginners XSLT question

How do I get the value for an attribute in my source document in an XSLT script?  i.e.:  If I have an element <Color red="25" green="30" blue="175"/> in my souce doc, what syntax do I use in my <xsl:template match="????"> to match the attribute name for red?

Thanks,
Rich

--------------------------------------------------------------------
Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421		

http://www.gretagmacbeth.com/		
--------------------------------------------------------------------


Re: beginners XSLT question

Posted by Bertrand Njipwo <be...@capcom.de>.
hi Rich,

you can get the value of your attributes with:
<xsl:value-of select="@red"/>
<xsl:value-of select="@green"/> ...etc.

lot of fun

Bertrand Njipwo
----- Original Message -----
From: "Richard Bolen" <bo...@GretagMacbeth.com>
To: "Apache FOP Users List (E-mail)" <fo...@xml.apache.org>
Sent: Thursday, August 15, 2002 8:27 PM
Subject: beginners XSLT question


How do I get the value for an attribute in my source document in an XSLT
script?  i.e.:  If I have an element <Color red="25" green="30" blue="175"/>
in my souce doc, what syntax do I use in my <xsl:template match="????"> to
match the attribute name for red?

Thanks,
Rich

--------------------------------------------------------------------
Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421

http://www.gretagmacbeth.com/
--------------------------------------------------------------------