Namespace Comments (and dtd encoding)

Peter Murray-Rust peter at
Wed Aug 5 11:18:22 BST 1998

At 10:20 05/08/98 +0000, james anderson wrote:

>could someone please post a "complete document" (that is including a dtd) for
>the third example in section 5 of the draft (the one with the root element

I'll have a go (in my copy it's the second example);

<!DOCTYPE bk:book [
<!ELEMENT bk:book (bk:title, isbn:number)>
<!ATTLIST bk:book 
	xmlns:bk CDATA #FIXED ""
	xmlns:isbn CDATA #FIXED "urn:ISBN:0-395-36341-6"
<!ELEMENT bk:title (#PCDATA)>
<!ELEMENT isbn:number (#PCDATA)>

The point is - I think - that the DTD parser is completely dumb. It doesn't
care about colons (except to recognise that they are legal). I assume -
though I haven't tried it - that this DTD will validate the example with
any of the current parsers.

The main problem is that some authors are going to want to include more
information than title and number. This may also involve other namespaces.
So then the content model gets very complex and has to be revised often. So
we actually end up with:

<!DOCTYPE bk:book [
<!ELEMENT bk:book ANY>
<!ATTLIST bk:book 
	xmlns:bk CDATA #FIXED ""
	xmlns:isbn CDATA #FIXED "urn:ISBN:0-395-36341-6"
	xmlns:dc CDATA #FIXED ""
	xmlns:html CDATA #FIXED ""
	xmlns:xml-data CDATA #FIXED ""
<!-- ... etc. -->
<!ELEMENT bk:title (#PCDATA)>
<!ELEMENT isbn:number (#PCDATA)>
<!ELEMENT dc:author (#PCDATA)>
<!ELEMENT html:p ANY>
<!ELEMENT xml-data:foo (<!-- some content model -->>
<!-- ... etc. -->

This implies the possibility of *locally valid information components* -
i.e. the XML-data content could be validated against that DTD but not the
larger document.

I also expect that there is a solution using Architectural Forms but I am
not an expert.


Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS, Virtual Hyperglossary

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

More information about the Xml-dev mailing list