W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2012

Re: scxml.xsd fails with xmllint tool

From: Jacob Beard <jbeard4@cs.mcgill.ca>
Date: Wed, 22 Feb 2012 15:41:44 -0500
Message-ID: <CADywnFhdf6ZCwkYfATC4dJW7q+GcT0v58u-VeFL2PDVKZFZPqg@mail.gmail.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>
Cc: www-voice <www-voice@w3.org>
Hi Jim,

Sorry to continue emailing the list about this issue, but I'm still
having trouble getting validation using the SCXML schema to work.

First, I diffed the files you sent me with the ones hosted on w3.org,
and was able to verify that they are identical.

Next, I tried using the Xerces validator, using the version of Xerces
shipped with Java, in Eclipse and from my own Java program,
Unfortunately, both of these approaches yielded errors like the
following:

org.xml.sax.SAXParseException; systemId:
file:/home/jbeard/workspace/test-validation/scxml-module-core.xsd;
lineNumber: 89; columnNumber: 43; cos-nonambig:
"http://www.w3.org/2005/07/scxml":state and WC[##any] (or elements
from their substitution group) violate "Unique Particle Attribution".
During validation against this schema, ambiguity would be created for
those two particles.


I then decided to try using Stylus Studio, which provides an easy way
to attempt validation using multiple validators:
http://www.stylusstudio.com/xml_schema/xsv.html

Here are the results:


Xalan Java 2.6.0


file:///c:/Users/jbeard/Downloads/basic0.xml:17,244: (Error)
cvc-complex-type.3.2.2: Attribute 'profile' is not allowed to appear
in element 'scxml'.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:89,43: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":state and WC[##any]
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:119,43: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":onentry and WC[##any]
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:138,45: (Error)
cos-nonambig: WC[##any] and
"http://www.w3.org/2005/07/scxml":transition (or elements from their
substitution group) violate "Unique Particle Attribution". During
validation against this schema, ambiguity would be created for those
two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:153,45: (Error)
cos-nonambig: WC[##any] and "http://www.w3.org/2005/07/scxml":raise
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:168,44: (Error)
cos-nonambig: WC[##any] and "http://www.w3.org/2005/07/scxml":raise
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:187,48: (Error)
cos-nonambig: WC[##any] and "http://www.w3.org/2005/07/scxml":raise
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:214,46: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":onentry and WC[##any]
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:238,43: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":onentry and WC[##any]
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:257,45: (Error)
cos-nonambig: WC[##any] and
"http://www.w3.org/2005/07/scxml":transition (or elements from their
substitution group) violate "Unique Particle Attribution". During
validation against this schema, ambiguity would be created for those
two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:281,40: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":elseif and WC[##any]
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:340,45: (Error)
cos-nonambig: WC[##any] and "http://www.w3.org/2005/07/scxml":raise
(or elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-external.xsd:69,42:
(Error) cos-nonambig: "http://www.w3.org/2005/07/scxml":content and
WC[##any] (or elements from their substitution group) violate "Unique
Particle Attribution". During validation against this schema,
ambiguity would be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-external.xsd:99,44:
(Error) cos-nonambig: "http://www.w3.org/2005/07/scxml":content and
WC[##any] (or elements from their substitution group) violate "Unique
Particle Attribution". During validation against this schema,
ambiguity would be created for those two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-external.xsd:119,46:
(Error) cos-nonambig: WC[##any] and WC[##any] (or elements from their
substitution group) violate "Unique Particle Attribution". During
validation against this schema, ambiguity would be created for those
two particles.
http://www.w3.org/2011/04/SCXML/scxml-module-data.xsd:55,47: (Error)
cos-nonambig: "http://www.w3.org/2005/07/scxml":data and WC[##any] (or
elements from their substitution group) violate "Unique Particle
Attribution". During validation against this schema, ambiguity would
be created for those two particles.



.NET XML Parser


http://www.w3.org/2011/04/SCXML/scxml.xsd:104,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:110,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:116,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:136,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:146,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:153,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:160,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml.xsd:167,4: Circular group reference.
http://www.w3.org/2011/04/SCXML/scxml-contentmodels.xsd:29,5: Wildcard
'##any' allows element 'http://www.w3.org/2005/07/scxml:data', and
causes the content model to become ambiguous. A content model must be
formed such that during validation of an element information item
sequence, the particle contained directly, indirectly or implicitly
therein with which to attempt to validate each item in the sequence in
turn can be uniquely determined without examining the content or
attributes of that item, and without any information about the items
in the remainder of the sequence.
http://www.w3.org/2011/04/SCXML/scxml-contentmodels.xsd:29,5: Wildcard
'##any' allows element 'http://www.w3.org/2005/07/scxml:transition',
and causes the content model to become ambiguous. A content model must
be formed such that during validation of an element information item
sequence, the particle contained directly, indirectly or implicitly
therein with which to attempt to validate each item in the sequence in
turn can be uniquely determined without examining the content or
attributes of that item, and without any information about the items
in the remainder of the sequence.
http://www.w3.org/2011/04/SCXML/scxml-contentmodels.xsd:29,5: Wildcard
'##any' allows element 'http://www.w3.org/2005/07/scxml:onentry', and
causes the content model to become ambiguous. A content model must be
formed such that during validation of an element information item
sequence, the particle contained directly, indirectly or implicitly
therein with which to attempt to validate each item in the sequence in
turn can be uniquely determined without examining the content or
attributes of that item, and without any information about the items
in the remainder of the sequence.
http://www.w3.org/2011/04/SCXML/scxml-contentmodels.xsd:29,5: Wildcard
'##any' allows element 'http://www.w3.org/2005/07/scxml:transition',
and causes the content model to become ambiguous. A content model must
be formed such that during validation of an element information item
sequence, the particle contained directly, indirectly or implicitly
therein with which to attempt to validate each item in the sequence in
turn can be uniquely determined without examining the content or
attributes of that item, and without any information about the items
in the remainder of the sequence.



MSXML6.0 DOM Parser/MSXML6.0 SAX Parser


file:///c:/Users/jbeard/Downloads/basic0.xml:17,244: Schema is
non-deterministic.
Problem occurs with element or namespaces [##any,
{http://www.w3.org/2005/07/scxml}transition].



Saxonica 9.3.0.8 Validator


Error on line 281 of scxml-module-core.xsd:
  Error in complex type scxml.if.type: Ambiguous content model, element
  <{...g/2005/07/scxml}cancel> appears in its own right, and also
matches an <xs:any> wildcard Warning: Ambiguous content model, element
<{...g/2005/07/scxml}cancel> appears in its own right,
  and also matches an <xs:any> wildcard



What this indicates to me is that multiple xml schema validators are
unable to process the SCXML schema due to an "ambiguous content
model". Validation might succeed with a newer version of Xerces,
though (the one bundled with Java can lag behind). Could you please
tell me which version of Xerces you've used that that is known to
work?

Thank you for your guidance in this,

Jake

On Wed, Feb 22, 2012 at 12:47 PM, Jacob Beard <jbeard4@cs.mcgill.ca> wrote:
> Sounds good, thank you Jim.
>
> Jake
>
> On Wed, Feb 22, 2012 at 12:36 PM, Jim Barnett
> <Jim.Barnett@genesyslab.com> wrote:
>> Jake,
>>  It looks to me like they have been updated, since the file modified date is ' 26-Jan-2012' for the relevant files.  Just to be sure,  I'm attaching my local copies of the schema files.  I have used these with Xerces without problems.
>>
>> - Jim
>>
>> -----Original Message-----
>> From: Jacob Beard [mailto:jbeard4@cs.mcgill.ca]
>> Sent: Wednesday, February 22, 2012 12:21 PM
>> To: www-voice
>> Subject: Re: scxml.xsd fails with xmllint tool
>>
>> Hi,
>>
>> I was just wondering if the SCXML schema was updated in the latest draft? The current draft links here:
>> http://www.w3.org/2011/04/SCXML/scxml.xsd
>>
>> This is the same URL as the one I was testing in my previous message, and my libxml-based validator is failing with the same errors, so it's not clear whether or not the schema has been revised.
>>
>> I'd greatly appreciate it if you could let me know. Thanks,
>>
>> Jake
>>
>> On Wed, Feb 15, 2012 at 2:46 PM, Jacob Beard <jbeard4@cs.mcgill.ca> wrote:
>>> Sounds good. Thank you, Jim.
>>>
>>> Jake
>>>
>>> On Wed, Feb 15, 2012 at 2:14 PM, Jim Barnett <Jim.Barnett@genesyslab.com> wrote:
>>>> Jacob,
>>>>  We are about to publish a new draft (next day or two).  I have used
>>>> the schema in this upcoming draft with Xerces without problems (I did
>>>> get errors when I used the schema from the current public draft, but
>>>> I don't remember having as many as you report, so there may still be
>>>> differences between different validators.)  I would recommend waiting
>>>> for the new draft.
>>>>
>>>> - Jim
>>>>
>>>> -----Original Message-----
>>>> From: Jacob Beard [mailto:jbeard4@cs.mcgill.ca]
>>>> Sent: Wednesday, February 15, 2012 1:51 PM
>>>> To: www-voice
>>>> Subject: scxml.xsd fails with xmllint tool
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to use the SCXML xsd [0] to validate a very basic SCXML
>>>> file [1] using the xmllint command line validation tool. xmllint
>>>> reports the following errors while attempting to parse the SCXML
>>>> schema:
>>>>
>>>> jbeard@jbeard-VirtualBox:~/workspace/scion/src/test/basic$ xmllint
>>>> --noout --schema http://www.w3.org/2011/04/SCXML/scxml.xsd
>>>> basic0.scxml
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-external.xsd:69: element
>>>> complexType: Schemas parser error : complex type 'scxml.send.type':
>>>> The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-external.xsd:119:
>>>> element
>>>> complexType: Schemas parser error : complex type
>>>> 'scxml.finalize.type': The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:89: element
>>>> complexType: Schemas parser error : complex type 'scxml.scxml.type':
>>>> The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:119: element
>>>> complexType: Schemas parser error : complex type 'scxml.state.type':
>>>> The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:153: element
>>>> complexType: Schemas parser error : complex type 'scxml.onentry.type':
>>>> The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:168: element
>>>> complexType: Schemas parser error : complex type 'scxml.onexit.type':
>>>> The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:187: element
>>>> complexType: Schemas parser error : complex type
>>>> 'scxml.transition.type': The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:214: element
>>>> complexType: Schemas parser error : complex type
>>>> 'scxml.parallel.type': The content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:281: element
>>>> complexType: Schemas parser error : complex type 'scxml.if.type': The
>>>> content model is not determinist.
>>>> http://www.w3.org/2011/04/SCXML/scxml-module-core.xsd:340: element
>>>> complexType: Schemas parser error : complex type 'scxml.foreach.type':
>>>> The content model is not determinist.
>>>> WXS schema http://www.w3.org/2011/04/SCXML/scxml.xsd failed to
>>>> compile
>>>>
>>>>
>>>> I was wondering if scxml.xsd is known to work, and if so, whether
>>>> someone could recommend a validator?
>>>>
>>>> Thanks,
>>>>
>>>> Jake
>>>>
>>>> [0] http://www.w3.org/2011/04/SCXML/scxml.xsd
>>>> [1]
>>>> https://github.com/jbeard4/SCION/blob/master/src/test/basic/basic0.sc
>>>> xml
>>>>
>>
Received on Wednesday, 22 February 2012 20:42:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 22 February 2012 20:42:37 GMT