- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 24 Aug 2000 08:11:42 -0500
- To: Noah_Mendelsohn@lotus.com
- CC: Yuichi Koike <koike@mmp.cl.nec.co.jp>, xmlschema-dev@w3.org
Noah_Mendelsohn@lotus.com wrote: > > Yuichi Koike writes: > > >> So, I think, the message is a warning, and the > >>instance is schema-valid. Is it right? > > No, the schema language prohibits non-deterministic content models. Several people have pointed that out, but I don't see anyone explaining why. There is a reason... Suppose your scheam had some appinfo that guided processing: <element name='A'> <complexType content='elementOnly'> <element ref='test:B' minOccurs='0' maxOccurs='unbounded'> <annotation><appinfo>turn left</appinfo></annotation> </element> <element ref='test:C' minOccurs='0'/> <element ref='test:B' minOccurs='0' maxOccurs='unbounded'> <annotation><appinfo>turn right</appinfo></annotation> </element> </complexType> </element> Given <A><B/></A>, it's not clear whether one should turn left or turn right. The "no non-deterministic content models" restriction in the XML schema spec makes sure that you can always correlate the elements in the input with bits of appinfo (or other type information) in your schema. -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 24 August 2000 09:13:08 UTC