>My problem is that the xml file sometimes has a default namespace, and
>sometimes not.
XPath is namespace aware. It doesn't care how the namespace is expressed;
whether prefix or default, it's matching on the namespace and local name,
not the QName.
XPath 1.0 does not support default namespaces in XPath expressions. You
must use a prefix to denote the desired namespace, even when the document
being searched didn't.
XPath 2.0 has proposed changing this. But 2.0 is still only a Working
Draft.
______________________________________
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