[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A theory problem
Hi! In our implementation of XSLT we use a simple set of heuristics to avoid reordering: Each subexpression is assigned zero or more of the following properties: SINGLETON : the expression can at most select a single node. SIBLINGS: the expression will select nodes in document order that are siblings of eachother. DESCENDANTS-OR-SELF: the expression will only select the context node or descendants to it in document order. Then we combine expressions in for example a path: e1 / e2 The new expression that results from this will have properties that are calculated from the combination of the subexpressions. I don't have time right know to list all the combinations but it isn't that hard to figure them out and I'll give an example: If e1 have the property SIBLINGS and e2 have the property DESCENDANTS-OR-SELF then the whole expression is guaranteed to be in document order. So by assigning the properties to primitive expression and writing rules for combinations we can avoid reordering in many situations. </David> _______________________________________________________________________ David.Rosenborg@xxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|