I could be way off here, but since \ only looks for immediate children and <unnamed_root><a b="c"/><a b="d"/></unnamed_root> has no immediate children (attribute named "b") you get an empty nodeseq. That's based on my assumption that running xpath-like queries on a nodeseq implicitly views the nodeseq as wrapped in an unnamed root element.
That jives a little better with other xml handling libraries than the possible alternative of merging all children of top-level elements into the same pool for the query.
Thanks, Chris
Thanks, Chris
In this particular case, I believe the nodeseq itself is the unnamed
root and it's contents are the children. At least that's the only
explanation that makes sense for this behavior, and it conforms to
xml's requirement of a root element.