Hi, thanks once more Michael,
Note also that the rule about concatenating text nodes comes into play here:
if your input were
<a>foo<!--hey!-->bar</a>
the result would be "foobar" rather than "foo-ostrich-bar" because of the
rule that adjacent text nodes are concatenated before atomization.
OK, that makes sense ... as in IDREFS value, it also has length 1
anyway, regardless of the comment.
document-node(schema-element(rubberduck))
document-node()[child::schema-element(rubberduck)]
Obviously this only works when used as a step in a path expression, or as
pattern: not for example when used in an "as" attribute.
Technically I think the rewrite is more like:
document-node()[count(child::*)=1 and count(child::text()=0) and
(child::schema-element(rubberduck))]
Stand by; can a document node ever, every contain text nodes?
Aren't the specified in XDM or even Infoset, to only have element
(exactly one), child or processing-instruction children?
Soren
--~------------------------------------------------------------------
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>
--~--