Re: [xml] Namespace Handling
- From: Tobias Reif <tobiasreif pinkjuice com>
- To: xml gnome org
- Cc: bj ph ed ac uk
- Subject: Re: [xml] Namespace Handling
- Date: Wed, 10 Sep 2003 11:08:04 +0200
Balint Joo wrote:
>>Then I can do queries from there with namespaces
>>(eg //bj:gnus )?
If you ask a tool to do something with
you *must* provide the namespace name (ag a URI) for the prefix.
(as Daniel said)
Daniel Veillard wrote:
> if bj is defined on the root node, then fine,
It still could be remapped to a different namespace name somewhere in
the document, no?
> You're making one fundamental mistake. The prefixes are not
> what is important is the namespace name. You search for gnus in "bar"
> namespace and that can be expressed as
> bk mapped to "bar"
> even if in the instance it uses the bj prefix.
Even some implementers get this wrong which is catastrophic ...
throwing an error for each undeclared prefix (be it in XPath queries,
documents, or etc) is the only way.
] [Thread Prev