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

Non-deterministic content model

From: Joseph M. Reagle Jr. <reagle@w3.org>
Date: Tue, 16 Jan 2001 15:30:50 -0500
Message-Id: <>
To: Noah_Mendelsohn@lotus.com
Cc: xmlschema-dev@w3.org

I've run across this problem that I saw Yuichi ask about, and you answer [2]:

[1] http://lists.w3.org/Archives/Public/xmlschema-dev/2000Aug/0017.html
[2] http://lists.w3.org/Archives/Public/xmlschema-dev/2000Aug/0018.html
>If you have the instance document:
>         <A>
>                 <B/>
>         </A>
>there is an ambiguity as to whether B matches the first or the third line
>of the content model for A.  Therefore, the content model itself is
>nondeterministic, as reported by XSV.

However, Yuichi's example had two defintitions for the element B, in mine I 
use an ANY:

><complexType name="SignatureMethodType" mixed="true">
>   <!-- (0,unbounded) elements from (1,1) external namespace -->
>   <sequence minOccurs="0" maxOccurs="1">
>     <element name="HMACOutputLength"  minOccurs="0"
>        type="ds:HMACOutputLengthType"/>
>     <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
>   </sequence>
>   <attribute name="Algorithm" type="uriReference" use="required"/>
><simpleType name="HMACOutputLengthType">
>   <restriction base="integer"/>

and get

><schemaError char='15' line='55' phase='instance' 
>content m
>odel for type SignatureMethodType: {Wildcard: 


><Signature Id="MyFirstSignature" xmlns="http://www.w3.org/2000/09/xmldsig#">
>   <SignedInfo>
>          <CanonicalizationMethod 
> Algorithm="http://www.w3.org/TR/2000/WD-xml-c14n-20000710">
>          </CanonicalizationMethod>
>          <SignatureMethod 
> Algorithm="http://www.w3.org/2000/09/xmldsig#dsa">
>          </SignatureMethod>
>          <Reference URI="http://www.w3.org/TR/xml-stylesheet/">

What would the problem here be? Also, I guess it's true to say a schema can 
have errors that will not be addressed upon validation, but only upon 
validation of its instances?

Joseph Reagle Jr.
W3C Policy Analyst                mailto:reagle@w3.org
IETF/W3C XML-Signature Co-Chair   http://www.w3.org/People/Reagle/
Received on Tuesday, 16 January 2001 15:30:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC