Subject: RE: Must be a better way to write this XPath expression
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 7 Jun 2003 17:47:47 +0100
|
> In my XSL to get sections 'a' and 'b' I would have thought
> something like:
>
> /data/stuff/(a|b)
>
> would work but the only thing I can get to work is:
>
> /data/stuff/a|/data/stuff/b
>
> which just seems too long winded for there not to be a better way to
> express it.
Which is why the former syntax is now allowed in XPath 2.0.
In 1.0 you can always use variables: ($a/a | $a/b)
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|