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

RE: The order of selected nodes in a select pattern with OrE

Subject: RE: The order of selected nodes in a select pattern with OrExpressions?
From: David Schach <davidsch@xxxxxxxxxxxxx>
Date: Sun, 24 Jan 1999 14:06:07 -0800
order of the nodes
In XQL, upon which the Microsoft implementation of XSL patterns is based,
document order is preserved by unions.

> -----Original Message-----
> From:	Tyler Baker [SMTP:tyler@xxxxxxxxxxx]
> Sent:	Sunday, January 24, 1999 12:52 PM
> To:	xsl-list@xxxxxxxxxxxxxxxx
> Subject:	The order of selected nodes in a select pattern with
> OrExpressions?
> 
> One thing that does not seem to be clear in the XSL in the XSL draft is
> in what order the nodes should be selected in a select expression with
> or expressions present.
> 
> For example say I have an XML file:
> 
> <a>
>   <b1>
>     a
>   </b1>
>   <b2>
>     b
>   </b2>
>   <b3>
>     c
>   </b3>
> </a>
> 
> What if I have a template:
> 
> <xsl:template match=a>
>   <xsl:apply-templates select="b3 | b2 | b1">
> </xsl:template>
> 
> Should the output text be: cba, or should the output text be: abc.
> 
> A more general question is: "Is the order of the UnionExpressions more
> significant or is the document order of the elements more significant"?
> 
> Basically what I am getting at is should an XSL Processor evaluate each
> PathExpression in the UnionExpression separately and in the order that
> the UnionExpressions are in, or should an XSL Processor recursively
> evaluate each subtree expression of each path expression in the union
> expression in that order.
> 
> Right now I am under the assumption that an XSL Processor should do
> something like:
> 
> for each path expression in a union expression
>   select all nodes which match up with the last subtree expression of
> the currently tested path expression
> 
> Then filter out any repeatedly selected nodes in the list.
> 
> The spec only says that:
> 
> "The context of the right hand side expressions is the context of the
> left hand side expression. The results of the right hand side
> expressions are node sets. The result of the left hand side UnionExpr is
> the union of the results of the right hand side expressions."
> 
> My understanding here is that you select in the order in which the path
> expressions occur and filter out redundantly selected nodes.
> 
> Is this the right way to do things or am I barking up the wrong tree
> here?
> 
> Tyler
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.