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

RE: the nearest ancestor with the attribute

Subject: RE: the nearest ancestor with the attribute
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2001 11:02:59 +0100 (MET)
RE:  the nearest ancestor with the attribute
> Noting that /@attr = /attribute::attr
> 
> I guess this means that since attribute axis is in document order,
> this means, since its the last step, that document order rules
> for this expression?

Well, attributes of an element aren't ordered in a defined way. The 
order is implementation dependent. You can't tell, what @*[1] gives.
Document order or reverse document order is *only* important in
location steps, or to be more specific, in the predicates of a step.
If you have an expression that evaluates to a node-set and apply
a predicate, then this predicate "filters the node-set with respect to 
the child axis." (see XPath 3.3)

Don't know, why it was phrased this way, I think it means exactly the
same as <<the nodes of an expression are ordered in document order>>.
Or is there a slight difference that I haven't discovered yet?
(See also the note in 3.3 of XPath)

Conclusion:
If there's a predicate, look to what "XPath construct" it applies.
If it's a step then the axis is important, since some of them are
reverse axes.
If it's an expression (evaluating to a node-set) then the order 
is always document order.
If you use xsl:value-of or the string function then you get always
the string-value of the first node in document order.
If you use xsl:for-each or xsl:apply-templates then the nodes are 
always processed in document order.

Cheers,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.