xsl-list
[Top] [All Lists]

Re: [xsl] Function for determining one XPath as subset of another

2016-01-26 11:34:09
even given your easy example


1. //w

2. /x/y/z/w[@a = 'v']


if y is a place holder for an xpath expression rather that just literally
matching the element y then
it isn't always a subset, consider

/x/doc('y.xml')/z/w[@a = 'v']

conversely

/x/y/z/w[@a = 'v'] and /x/y[1+1=2]/z/w[@a][upper-case(@a)= 'V']

do select the same sets but to know that you have to be able to prove that
arbitrarily complicated xpath boolean expressions are true which isn't
likely to be possible.

Thanks David, I did realise that, I am only looking at simple path
expressions with predicates where the expressions can be determined
statically by only parsing them. So in my instance 'y' would always be
the element named `y`.


-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

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