Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] [schemas] non-deterministic content model avoidance

From: Bob Foster <bob@------.--->
To: Philippe Poulard <Philippe.Poulard@------.-----.-->
Date: 9/7/2004 5:53:00 PM
Philippe Poulard wrote:

 > hi,
 >
 > i try to design a schema language, and i encoutered the famous 
well-known problem :
 > [snip]
 > 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 ?


No.

 > -it is possible with Relax NG ?

Yes.

In fact, in the compact syntax, with suitable definitions of odd and 
even, it can be written exactly as you have it: (odd,even)*, odd?.

 > 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.

Don't understand your question. If you're asking whether the above 
constraint could be enforced with Schematron, the answer is yes.

Bob Foster
http://xmlbuddy.com/

(Reply not cross-posted.)

 > thanks for your help


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent