Weird behavior of XPath.evaluate() 2007-05-10 - By keshlam@(protected)
> I can evaluate namespaced expressions using the InputSource, but it doesn't work if I evaluate a namespaced > expression passing an Element as a context node.
Are you sure the DOM tree is a fully namespace-aware Level 2 DOM, built using createElementNS/createAttributeNS? The non-namespace-aware nodes are considered obsolete except for backward compatability with DOM Level 1 applications, and modern applications often don't bother to try to process them. I believe Xalan does explicitly require a namespace-aware DOM as its input.
Does it have all the required namespace declaration attributes? Xalan used to require they be present; I'm not sure whether it still does.
______________________________________ "... Three things see no end: A loop with exit code done wrong, A semaphore untested, And the change that comes along. ..." -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.org/pegasus/songs/threes-rev-11.html) <html><body> <p>><font size="4"> I can evaluate namespaced expressions using the InputSource, but it doesn't work if I evaluate a namespaced > expression passing an Element as a context node. </font><br> <br> <font size="4">Are you sure the DOM tree is a fully namespace-aware Level 2 DOM , built using createElementNS/createAttributeNS? The non-namespace-aware nodes are considered obsolete except for backward compatability with DOM Level 1 applications, and modern applications often don't bother to try to process them . I believe Xalan does explicitly require a namespace-aware DOM as its input.< /font><br> <br> <font size="4">Does it have all the required namespace declaration attributes? Xalan used to require they be present; I'm not sure whether it still does.< /font><br> <br> ______________________________________<br> "... Three things see no end: A loop with exit code done wrong,<br> A semaphore untested, And the change that comes along. ..."<br> -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (<a href="http://www .ovff.org/pegasus/songs/threes-rev-11.html">http://www.ovff.org/pegasus/songs /threes-rev-11.html</a>)</body></html>
|
|