- From: Jonathan Marsh <jmarsh@microsoft.com>
- Date: Thu, 16 Mar 2000 13:11:45 -0800
- To: "'John Boyer'" <jboyer@PureEdge.com>, James Clark <jjc@jclark.com>, "Martin J. Duerst" <duerst@w3.org>
- Cc: IETF/W3C XML-DSig WG <w3c-ietf-xmldsig@w3.org>, w3c-xsl-wg@w3.org
> -----Original Message----- > From: John Boyer [mailto:jboyer@PureEdge.com] > It's also going to be very awkward. Instead of something like > > e1|e2|e3|e4 > > you will have to write > > parse($input,true())/e1|parse($input,true())/e2|parse($input,t > rue())/e3|pars > e($input,true())/e4 > > <John> > Parsing 4 times in this case is simply not necessary: > > parse($input,true())/descendant-or-self::node()[id("e1")|id("e > 2")|id("e3")|i > d("e4")] This is not equivalent to James' example. I think the following is, however: parse($input,true())/node()[self::e1 or self::e2 or self:e3 or self::e4] I can't think of a situation right now where multiple parses would be necessary, but some of the cases could get pretty byzantine: a | b//x becomes: parse($input,true())/descendants::node()[(self::a and not(parent::*)) or (self::x and ancestor::b)] Generic XPath implementations will be optimized for the simple case and may perform better. Also, just because parse() need only be called once, doesn't preclude users from calling it more than once, which could be quite costly.
Received on Thursday, 16 March 2000 16:13:56 UTC