Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: more XPath struggles (tDOM)

From: "Donal K. Fellows" <donal.k.fellows@---.--.-->
To: NULL
Date: 5/2/2008 3:56:00 PM
Mikhail Teterin wrote:
> But the namespaces are defined in the document itself
> -- for example:
>    <xc:XmlCache xmlns:xc="XmlCache" xc:action="Update">
> why do I still need to specify them? It certainly works with xml_grep... Is
> there a bug in the package (tDOM), or is the above element not sufficient
> to define a namespace?

Basically, namespaces and XPath don't sit too well together (when the
XPath expression is located in an XML document) because the document
namespace context at the point in the document where the XPath is
located is shrouded from the expression (because it is formally an
xsd:string, which is not namespace-aware according to the namespaces
spec). This means that if you're embedding an XPath expression in an
XML document, you also need to embed a way to tell it what the
namespace context to evaluate in is. (This is stupid, but the way it
is and isn't a Tcl problem at all.)

If the XPath expression is not contained in some XML context, then it
is even more obvious that the namespace context needs to be given.

Donal.


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent