xsl-list
[Top] [All Lists]

Re: [Fwd: RE: [xsl] Need help OR'ing in XPATH.]

2006-03-22 05:38:13
Michael Kay wrote:


Putting that together:

select="book[owner is "aaa" or chapter/owner='aaa']

ALternatively you could write

select="book[owner is "aaa"] | book[chapter/owner='aaa']

The "|" operator here forms the union of two sets.

In both cases the results will be in document order, as required.


Thanks--it worked, I used the first one. As for the second, I saw the | operator earlier but was concerned that it won't guarantee that it *would* be in document order. The XPath spec seems to be vague on this[1] -- i.e., whether I can guarantee document order with it, *or* it just so happens that they way the major XSLT implementations implement this operator result in it being in document order.

Glen

[1] http://www.w3.org/TR/xpath#node-sets

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>