OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] (newbie) DTD question

[ Lists Home | Date Index | Thread Index ]

From: "Richard Tobin" <richard@cogsci.ed.ac.uk>

> No, you just can't have a very precise DTD in that case.  You could
> just use:
>  <!ELEMENT name ANY>

Yes. If your data is not mixed content, then you can usually do
a top-level  | of the two content models.

<!ELEMENT mouse ( (cheese, nose, tail) | (button, pad, wheel))  >

That way you only lose minimal type strength (i.e. a little bit on the first
element only).   

The bigger problem is that you lose the ability to have required attributes,
and that there is a chance that there attributes with different declarations
for the same name.  That is one reason why it is better to never have
attributes called "id" that are not of type and function "ID" also. If you 
strength reduce an ID attribute down to NMTOKEN or CDATA, it
disappears from the list of IDs known to a validating processor. 

Rick Jelliffe


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS