[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Reading Attributes in XSL

Subject: Re: Reading Attributes in XSL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 15 Nov 2005 16:31:42 GMT
reading attribute 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()&gt;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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.