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

Re: XML Namespaces difficulty

Author:Ken MacLeod
Posted:8/29/2000; 11:55:43 AM
Topic:cam?
Msg #:20504 (In response to 20492)
Prev/Next:20503 / 20505

I can tell you are looking at XML Namespaces at a much different level than typical users would, so this followup is directed at that: someone who would write the backend of an XML Namespace processing system that users would use.

I understand the general intent of namespaces, but general intent is not enough for me to code a deterministic symbol space that I know will have identical semantics with every other implementor's system.

The deterministic symbol space is the tuple (NamespaceURI, LocalName) which forms a universally unique element or attribute name. Prefixes, namespace declarations, and declaration scope are all just syntactic (serialization) structures.

"Semantics" is fuzzy as used here, NSs do not define "semantics", just identity, one can be assured that (NamespaceURI, LocalName) is the same name regardless of which system it resides in.

One of the example I like to use goes like this: Before namespaces, one could have a structure with attributes like this:

    doc.title
    doc.description

With the addition of namespaces (which only happens when you require a decentralized distinguishing mechanism for mutual developers not to stomp on each other's feet), it begins looking something like this:

    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.

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


There are responses to this message:


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

© Copyright 1998-2001 UserLand Software, Inc.