Joseph Kesselman wrote:
You actually can write an xpath which is completely self-contained and portable but its messy eg:
namespace I have to qualify the element name with the namespaceNo, there isn't. You must use a prefix for the default namespace.
prefix in the XPath expression for it to work. Is there any way
to make XPathEvaluator() recognize element names without a prefix
as being in the default namespace?
I'm told XPath 2.0 is proposing to add a default-namespace mechanism.
I don't know whether they're going to do anything about my own pet peeve,
which is that there is no syntax in XPath itself for binding namespaces and
hence it's impossible to write an XPath that is completely self-contained
and portable; some (unspecified) source for the prefix-to-namespace mapping
is always required.
/ex:foo/ex:bar
can be written as:
/*[namespace-uri()='http://www.example.com/foo' and local-name()='bar']/*[namespace-uri()='http://www.example.com/foo' and local-name()='moo']
and will work anywhere :-)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
