David Carlisle wrote:
[Yves wrote]: Thank you very much for this hint - I actually need a
test that returns true if all children carry the attribute AND if
there are element children at all [...]
there are always many ways of phrasing these things. [...]
for example to write the xpath to match the english above you could
write
(every $c in * satisfies $c[(_at_)attribute]) and *
although a more compact way to say that in english is to say no child
exists which does not have the attribute, or in xpath
not(*[not(@attribute)])
But these expressions are not equivalent, since the second returns True
in absence of any element children, whereas the first of course returns
False (speaking from the experience of testing these two, not by
knowledge of the specs). So I suppose I will have to require the
presence of child elements explicitly like in the first expression
above, but that's no big deal.
Yves
--~------------------------------------------------------------------
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>
--~--