[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to access all attributes and their values ?
Thomas,
It's tempting simply to produce code that does what you want: <xsl:template match="elem"> <xsl:for-each select="@*"> <xsl:text>
Attribute name=</xsl:text> <xsl:value-of select="name()"/> <xsl:text>Attribute value=</xsl:text> <xsl:value-of select="."/> </xsl:for-each> </xsl:template> But to be thorough, I also have to ask where you're looking for instruction on XSLT, since in several respects your pseudo-code is, err, "creative". You've got some things right, but other things are pretty far off. Maybe you could use a little help from the Mulberry Quick Reference to XSLT/XPath 1.0, which is even easier, for many syntax questions, than guessing. You'll find it at http://www.mulberrytech.com/quickref/index.html. Cheers, Wendell At 02:27 PM 11/1/2004, you wrote: For a given node I want to list all its (unknown) attribute names and (unknown) attribute values.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|