On Sunday, January 6, 2002, at 12:46 PM, Timothy M. Dean wrote:
I believe it is a problem with the Xindice (or possibly Xalan or Xerces)
implementation. Read on for my justification.

Ok, then this is the wrong list for that.


First point: I don't think that how the document's namespaces are
specified
(default or explicit) matters in the least. The document, as stored in
the
DB contains elements/attributes with local names and optional namespace
URI's.
The prefixes used for explicit identification and the default namespace
identification are simply syntactic mechanisms to tell parsers what
namespace URI's to apply to what elements.

They don't matter in the least. Wasn't really my point. But mixing a defaulted namespace XPath with a document that has a mixture of namespaced and non-namespaced nodes is problematic because *none* of the non-namespaced nodes will be accessible to the XPath since there's no way to turn off namespaced scope in the XPath expression if it's defaulted.


Yeah, sure, there are nasty kludges like using wildcards and predicating them against the node name and namespace uri, but that's more work than just disallowing default namespaces altogether and forcing people to use even a one character prefix.

Generally, if you have some namespaced elements in a document, then all
will be namespaced. While this is not a requirement it seems to be far
and away the most common usage. Even so, those few cases which might try
this approach have an easy option. If parts of their documents contain
no namespace identifications, then they should not be using default
namespaces in their XPath queries: It simply does not make sense for
them. These few cases could be solved very eaily by only setting
namespaces for certain prefixes.

I think this is a bad assumption, especially when documents are heavily and programmatically aggregated, which is fairly common.


work. However, default namespaces are in the XML namespace spec, they
are supported by Xerces, they are supported by Xalan, and all of the
hard parts in Xindice are already taken care of when handling explicit
namespaces. There really is no significant reason I can think of to
*not* include default namespace support within Xindice.

Why default namespaces wouldn't work, I have no idea, because it was one of the first things I tested when I wrote the namespace implementation. The resolver uses the Symbol Tables which ignore prefixes completely (except for serialization) and only work against the namespace URL, so there's a possibility that the default namespace setting/getting was failing at a level closer to the client. But again, this is a discussion for the Xindice lists.


--
Tom Bradford - http://www.tbradford.org
Developer - Apache Xindice (Native XML Database)
Creator - Project Labrador (XML Object Broker)

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to