> The alternative -- which is VERY bad practice -- is to match on node type
> with predicates to test the node's local name, thus bypassing namespace
> sensitivity.

You can also check the namespace, something like
//*[local-name()='test' and namespace-uri()='http://test.com']
will match all test elements from the http://test.com namespace.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Joseph Kesselman wrote:



XPaths are namespace-aware. If you want to reference a node that's in a namespace, the XPath must use a prefix bound to that namespace. (XPath 2.0 is introducing the ability to set a default namespace for an XPath, I believe, but Xalan doesn't support that yet.)

The alternative -- which is VERY bad practice -- is to match on node type
with predicates to test the node's local name, thus bypassing namespace
sensitivity.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to