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


Help: OASIS Mailing Lists Help | MarkMail Help



   [schemas] non-deterministic content model avoidance

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: [schemas] non-deterministic content model avoidance
  • From: Philippe Poulard <Philippe.Poulard@sophia.inria.fr>
  • Date: Tue, 07 Sep 2004 19:29:06 +0200
  • Newsgroups: comp.text.xml
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040806


i try to design a schema language, and i encoutered the famous 
well-known problem :

valid documents are :

invalid documents are :

to express the constraints, we could write :
(odd, even)*, odd?
but it is invalid in DTD because of the violation of the 
"non-deterministic content model" rule

as you know, this problem is unresolvable because it is an unambiguous 
pattern which is not deterministic and can't be rewritten in a 
deterministic form (i picked it from the Eric's relax book)

my schema language can express such a content model (4 lines) without 
looking forward, but i'd like to know if :
-it is possible with W3C XML Schemas ?
-it is possible with Relax NG ?

additionally, i'd like to know whether Schematron can be used for 
editing purposes or not (i don't think so), that is to say if one can 
predict if an element is available with a given context, for example.

thanks for your help

           (. .)
|   Philippe Poulard    |


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

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