[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Reading Attributes in XSL
> 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 ________________________________________________________________________
|
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
|