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

Can I predict the build order of nodes?

Subject: Can I predict the build order of nodes?
From: "Kevin Brown" <kevin@xxxxxxxxxxx>
Date: Sun, 14 Feb 2010 10:50:47 -0800
 Can I predict the build order of nodes?
I noticed an interesting build order/selection issue between Saxon and
Microsoft XSL transforms ... in my style sheet I have:

<xsl:param name="stylemasterfile">
     <xsl:value-of select="/winelist/stylemasterfile"/>
</xsl:param>

<xsl:param name="stylemasterset" select="document($stylemasterfile)/styles |
/winelist/styles"/>

<xsl:variable name="stylemaster" select="$stylemasterset[last()]"/>

The XML may have:

1) a file pointer (in /winelist/stylemasterfile) which contains <styles>
2) an embedded <styles> (at /winelist/styles)
3) both

If it contains both, the rule should be to select the embedded one. 

But selecting $stylemasterset[last()] and testing I noted that they are in
opposite order on the two XSLT transformers when both exist.

Without saying which is which ... what is the right answer? What do you
think is the proper result of this:

document($stylemasterfile)/styles | /winelist/styles

Internal styles from /winelist/styles
External styles from document($stylemaster)/styles

or

External styles from document($stylemaster)/styles
Internal styles from /winelist/styles

Or does the spec make no determination of order?

Kevin Brown
RenderX

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.