This page is no longer maintained — Please continue to the home page at

XPath-like \, node sequences, and attributes

No replies
Cay Horstmann
Joined: 2009-09-04,
User offline. Last seen 42 years 45 weeks ago.
I don't understand how \ works with node sequences and attributes. Consider first

 <a><b/></a><a><b/></a> \ "b" // NodeSeq(<b></b>, <b></b>)

Ok, \ works with node sequences.


(<a b="c"/>) \ "@b" // c

Ok, \ works with attributes

But now consider

(<a b="c"/><a b="d"/>) \ "@b" // NodeSeq()

Huh? It doesn't work with attributes and node sequences?

FWIW, \\ works ok:

(<a b="c"/><a b="d"/>) \\ "@b" // NodeSeq(c, d)

Is this a bug or a feature?



Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland