RE: XML Validity and DTD dependance

 

> -----Original Message-----
> From: public-xml-core-wg-request@w3.org 
> [mailto:public-xml-core-wg-request@w3.org] On Behalf Of John Cowan
> Sent: Wednesday, 13 April, 2005 14:37
> To: Rich Salz
> Cc: public-xml-core-wg@w3.org
> Subject: Re: XML Validity and DTD dependance
> 
> 
> Rich Salz scripsit:
> 
> > DTD's are ignorant of namespaces.  This means that you 
> cannot write a
> > normative DTD for a namespace (as you might do with XML Schema). The
> > best you can hope to do is write something for expository purposes,
> > using particular namespace prefixes as an example.  Each instance of
> > a document would then have to rewrite the DTD to use the namespace
> > prefixes that are used in the document.
> 
> The use of DTDs with namespaces is not so impossible as you make out.
> In fact there is a well-known hacque involving parameter entities that
> lets you parameterize namespace prefixes.  It's true that you are
> still restricted to a one-to-one relationship between prefixes and
> namespaces in a given document, but many consider that to be 
> a Good Thing.
> 

I'm not sure I'd view the existence of this trick as a 
strong argument towards the debate that DTDs and namespaces 
work well together.  Nor do I think one needs to win such an 
argument to be against wanting to change the status of DTDs 
with respect to XML 1.x, so for the most part, I'd rather
not go too far down this path.  But...

> Here's an example:
> 
> <!ENTITY % xhtml "xhtml">
> <!ENTITY % html "%xhtml;:html">
> <!ENTITY % head "%xhtml;:head">
> <!ENTITY % body "%xhtml;:body">
> ...
> <!ELEMENT %html; (head,body)>

...just for the archive and by way of a parenthetical remark
on this message, I think you need (%head;,%body;) here.

> <!ELEMENT %head; ...>
> <!ELEMENT %body; ...>
> ...

paul

Received on Wednesday, 13 April 2005 20:59:46 UTC