W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Re: Substitution Groups and NonDeterminism

From: Niko Suave <niko@alum.mit.edu>
Date: Fri, 7 Dec 2001 16:23:12 -0500 (EST)
To: Mark Feblowitz <mfeblowitz@frictionless.com>
cc: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Message-ID: <Pine.LNX.4.21.0112071622180.16573-100000@sub-zero.mit.edu>
> <xs:element name="TaxWitholdingExempt" type="TaxWitholdingExempt"
> minOccurs="0"/>
> <xs:element ref="Partner" maxOccurs="unbounded"/>
> <xs:element name="AttachmentReference" type="AttachmentReference"
> minOccurs="0"
> <xs:element ref="ShipToPartner"/>
> 
> This appears to create a nondeterminism because a ShipToPartner could match
> either the general reference in the Substitution Group or the specific one
> at the end (past the generic reference). 
> 
> Am I correct that, if I have a Substitution Group as element content that I
> cannot place any of its members as succeeding siblings without triggering a
> nondeterminism? Is there a way around this (that doesn't force the
> succeeding sibling down into some further nested content)?

The key here is that the AttachmentReference is optional.  If minOccurs
were non-zero, then I don't think there would be any ambiguity.

niko
Received on Friday, 7 December 2001 16:19:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT