Namespaces: silly question

John Cowan cowan at locke.ccil.org
Fri Aug 7 17:38:33 BST 1998


Lars Marius Garshol scripsit:

> These documents are supposed to be processed in
> part by software written for IBTWSH documents, so Sral adds to his DTD
> the following declaration:
> 
>   <!ATTLIST IBTWSH-root-element
>             xmlns:IBTWSH "http://www.purl.org/foo" #FIXED>
> 
> so that all IBTWSH elements will use the IBTWSH namespace by default.

The problem is all the worse in that IBTWSH doesn't have a root
element, being meant solely for embedding (there are no IBTWSH
*documents* as such; HTML serves that function).  I know you just
chose IBTWSH as a well-known example, but the problem's bigger
than you thought.

> Then, somewhere in one of his documents, Sral writes:
> 
>   <IBTWSH:P>Huba!</IBTWSH:P>
> 
> This is where the problems begin. (Well, they really started above,
> but it's easier to see here.) Srals validating parser can now do one
> of three things if it supports namespaces:
> 
>   a) complain that the IBTWSH:P element has not been declared. (Which
>      is literally true: it was declared as P.)

Seems to me that it *must* do this in the name of SGML backward
compatibility.  The developers of namespaces don't seem to give
a red rubber rat's **** about DTD-based validation.

> In other words: as far as I can understand either DTDs must use the
> full namespace names in all declarations, as in
> 
>   <!ELEMENT http://www.purl.org/foo:P ...>
> 
> (which is truly unreadable, and also not well-formed) or there must be
> some means by which a DTD can declare its namespace, which will of
> course be difficult since one may want to mix namespaces.

DTDs don't *have* namespaces under the new draft.  DTDs understand
prefixes only, without a clue as to what the prefixes might mean.

-- 
John Cowan	http://www.ccil.org/~cowan		cowan at ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list