Subject: Re: [xsl] Reading Attributes in XSL From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 15 Nov 2005 16:31:42 GMT |
> I am trying to read attributes of current node such that I read the first > Attribute Note that attribute order is stable but implementation defined. What do you mean by "first attribute" ? You can use @*[1] to select the first attribute in document order, but that need not be (and often is not) the first attribute to appear on the element. (XML parsers are not required to report the order in which attributes appear). On the face of it you seem to want <xsl:for-each select="@*[1]|*/@*"> something for first attribute and attributes on children </xsl:for-each> <xsl:for-each select="@*[position()>1]"> something for later attributes </xsl:for-each> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Reading Attributes in XSL, pankaj . ahuja | Thread | Re: [xsl] Reading Attributes in XSL, Jon Gorman |
[xsl] Writing results across the ne, Colin Paul Adams | Date | Re: [xsl] Reading Attributes in XSL, Jon Gorman |
Month |