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] Deterministic content models???

[ Lists Home | Date Index | Thread Index ]

Doug Rudder scripsit:

> Exactly.  But I can see where someone with an SGML DTD background (like me,
> for instance) might initially try use this construct out of habit in an XML
> DTD -- until of course it fails to validate in XML and requires debugging.

Or, of course, you can go to RELAX NG where there are no such silly rules,
and write something like this:

paracontent = (\text | list | (table, tabnote*) | figure)+

\text = text | this | that ...

list = foo | bar | baz ...

table = element table { ... }

tabnote = element tabnote { ... }

figure = element figure { ... }

(The \ before "text" prevents it from being confused with the builtin
word "text", which is the equivalent of #PCDATA.)

-- 
John Cowan                                <jcowan@reutershealth.com>     
http://www.reutershealth.com              http://www.ccil.org/~cowan
Yakka foob mog.  Grug pubbawup zink wattoom gazork.  Chumble spuzz.
    -- Calvin, giving Newton's First Law "in his own words"




 

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

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