This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Getting Attribute names in an XML with XSLT stylesheet
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 8 Apr 2002 02:58:17 -0600 (MDT)
- Subject: Re: [xsl] Getting Attribute names in an XML with XSLT stylesheet
- Reply-to: xsl-list at lists dot mulberrytech dot com
Morgan Nagarajan wrote:
> <xsl:template match="@*">
> <xsl:value-of select="."/>
> </xsl:template>
> but this displays only attribute's value not it's name.
<xsl:value-of select="name()"/>
or
<xsl:value-of select="local-name()"/>
You might want to look over the functions section of the XPath spec.
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list