[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: A bug or incorrect logic?

From: Arshad Noor <arshad.noor@strongauth.com>
Date: Fri, 31 Oct 2008 10:44:31 -0700
Message-ID: <490B43FF.3010809@strongauth.com>
To: Michael Kay <mike@saxonica.com>
CC: xmlschema-dev@w3.org
Re: A bug or incorrect logic?

Given that A is optional, shouldn't the error message indicate
that (at a minimum) "B or C" is expected?

I do understand that at the parser is expecting A, B or C at the
point where the content was found; it just seems that instead of
giving error message X or Y (both of which would have been valid),
it chose to give X when I was expecting to see Y.

Thanks.

Arshad Noor
StrongAuth, Inc.

Michael Kay wrote:
> Your content model allows an optional PersonPrefixName, and then a required
> element which can be either a PersonFirstName or a PersonGivenName. So empty
> content is not allowed. The error message is telling you that at the point
> where the end of the content was found, there are three things that would
> have been valid, a PersonPrefixName, a PersonFirstName, or a
> PersonGivenName. 
> 
>> the XML Schema tool gives me the following error:
>>
>> cvc-complex-type.2.4.b: The content of element 'SignerName' 
>> is not complete. One of '{PersonPrefixName, PersonFirstName, 
>> PersonGivenName}' 
>> is expected. [129]
>>
>> However, the PersonPrefixName has a minOccurs of "0", so why 
>> am I seeing an error where the tool insists that the 
>> PersonPrefixName is expected?
> 
> It's saying "One of A, B, or C is expected". I can't see how you read that
> as "insisting that A is expected".
> 
> Michael Kay
> http://www.saxonica.com/
> 
Received on Friday, 31 October 2008 17:45:10 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.