@fn I only did a little bit of XPath, but from what I remember, it's a tree-walking language - not a graph-working one.
Does it have an uniform way of traversing both the document overt structure and indirect links?
Say, I have a blob of XML like:
<foo>
<bar>
<hello />
</bar>
<baz ref="#munroe" />
</foo>
<xkcd id="munroe">
<hello />
</xkcd>
And wanted to ask for "path from 'foo' to 'hello'", is there a way for a single query to naturally give me both foo->bar->hello and foo->baz->xkcd->hello?