![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: more XPath struggles (tDOM) >Thread Next - Re: more XPath struggles (tDOM) Re: more XPath struggles (tDOM)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. | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
