Archive of UserLand's first discussion group, started October 5, 1998.

Re: XML Namespaces difficulty

Author:David McCusker
Posted:8/29/2000; 12:55:14 PM
Topic:cam?
Msg #:20508 (In response to 20504)
Prev/Next:20507 / 20509

Ken MacLeod: The deterministic symbol space is the tuple (NamespaceURI, LocalName) which forms a universally unique element or attribute name.

That's very good, I love hearing about tuples, sets, and operators. Given that definition, I would only ask whether the NamespaceURI part is ever implied by context, rather than stated explicitly?

If the namespace is ever implied, presumably this is across some scope. Is there a nice definition for such scopes, and are they lexical? Inside a scope where a namespace is implied, all all symbols so implicitly scoped, or do some symbols escape the qualification?

Ken:


dc = "http://purl.org/dc/elements/1.1/"

doc.title
doc.description
doc.(dc, 'source')

Here, the object doc has had a new set of attributes "mixed-in" to it (from the Dublin Core in this example). The new attributes are distinguished from the originals by fully qualifying the tuple used as accessors.

That's a good example and looks clear. What default namespace qualifies the symbols 'title' and 'description' above?

Ken: It's not clear to me that there's any ambiguity there, can you shed more light on that?

The example looks like code in some language I assume is not XML. Often code in procedural languages is less ambiguous than encodings in declarative languages. Normally I think of XML as primarily declarative in use (though folks could also use it procedurally, I know).

So my question would be this. Is XML syntax less clear than the example about when an explicit namespace is used for qualification?


There are responses to this message:


This page was archived on 6/13/2001; 4:56:23 PM.

© Copyright 1998-2001 UserLand Software, Inc.