Project

Profile

Help

XPath doc function and NODESET

Added by Anonymous about 17 years ago

Legacy ID: #4493495 Legacy Poster: kendall shaw (queshaw)

I get an empty NodeList from XPathEvaluator.evaluate("doc('test.xml')/*", n, XPathConstants.NODESET), when the same expression returns a node if I ask for XPathConstants.NODE. Shouldn't the NodeList have 1 item?


Replies (1)

RE: XPath doc function and NODESET - Added by Anonymous about 17 years ago

Legacy ID: #4495187 Legacy Poster: Michael Kay (mhkay)

I'm surprised Saxon should return a (DOM) NodeList at all. My reading of the code suggests that if the context node is a DOM Node, but the returned nodes are Saxon nodes, the result should be null - not a very satisfactory outcome either! Basically JAXP is underspecified when you use it with multiple documents using different document models, and Saxon is underspecified/undertested in this area also. I'll look into this one on return from vacation.

    (1-1/1)

    Please register to reply