ElemenTree and namespaces

Fredrik Lundh fredrik at pythonware.com
Tue May 17 02:38:14 EDT 2005


oren.tirosh at gmail.com wrote:

> In theory, namespace prefixes are entirely arbitrary and only serve as
> a temporary link to the namespace URI. In practice, people tend to get
> emotionally attached to their favorite prefixes. XPath also breaks this
> theory because it refers to prefixes rather than URIs.

if your XPath processor requires you to use the same namespace
prefixes in the XPath expression as you're using in the document,
that processor is broken.

(XPath processors that can only work on expressions embedded
in XML documents may be an exception to that rule; they can get
the prefix/URI mapping from the execution context)

</F>






More information about the Python-list mailing list