- Create a org.w3c.dom.Document with a root node "foo" and children "bar" and "baz"
- Create a org.w3c.dom.DocumentFragment from that, having just the nodes "bar" and "baz"
- Evaluate the XPath expression "/" on the fragment, and it will select the fragment itself as being the root. This is desired, and confirms to what Xerces does.
- Evaluate the same XPath expression "/" on a node within the fragment, and the original Document is selected instead. When using Xerces, the fragment is selected, as desired.
Essentially this means, that one will have to use either "/bar" or "/foo/bar" to find the same node, depending on which node within the fragment is used as the context, which shouldn't be the case since absolute paths are used!
For some reason Saxon thinks the node belongs to the original document, not the fragment.