[XML-SIG] [Q] Namespace

Lars Marius Garshol larsga@ifi.uio.no
21 Nov 1998 22:28:29 +0100

* Tamito Kajiyama
| What should a validating parser do on the unprefixed element `bar'?
| [...]
| When the default namespace is undefined, what should a validating
| parser do for unprefixed elements?

Nothing. :)

If asked, it should reply that the namespace is undefined. Remember,
the namespace is just that, an identifier, and nothing more. It's just
used to be able to uniquely identify elements and attributes.
| I understand that a namespace has an associated schema (e.g. DTD,
| RDF schema), 

It does not. A namespace is just a URI used to distinguish a set of
names from all other names, globally.

Of course, in our minds there is usually an association between the
namespace and a schema/DTD, but the parser knows nothing of this.

| and a parser validates a prefixed element by referring the schema
| associated to the namespace prefix.

In fact, validation as defined in XML 1.0 does not work with
namespaces, which is a point against them. A prefixed element is
invalid if it was not declared with the prefix...

| So, If an XML document has its DTD specified by <!DOCTYPE ...>,
| there is a namespace associated to the DTD.  Is my understanding
| correct?

No. :) There is no requirement that there be any namespaces at all in
XML documents, and like I said namespaces and DTDs don't work very
well together.

What namespaces do is e.g to allow you to use the TITLE element from
both HTML and DocBook in the same DTD, and still be able to tell them
apart, by associating instances of the TITLE element type with different 

--Lars M.