W3C home > Mailing lists > Public > www-voice@w3.org > October to December 2012

xsd validation bug in scxml? cvc-complex-type.2.4.b

From: Carlos Verdes <cverdes@gmail.com>
Date: Sat, 24 Nov 2012 13:45:12 +0000
Message-ID: <CAMZOHDM1vbHf2SqaSfHk4bdHL2PtRbBuz9C5MnATxMORm+pctw@mail.gmail.com>
To: xmlschema-dev@w3.org, "www-voice@w3.org" <www-voice@w3.org>
Hi,

I'm validating a scxml and getting a validation error which I don't think
it is.

The xml extract is:
<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:a="
http://www.nosolojava.com/android.scxml"
    xmlns:xmpp="http://www.nosolojava.com/xmpp.scxml"
    version="1.0" >
...

<!-- history state -->
<history id="history-conn-state">
   <transition target="chat-connected-idle" />
</history>

The error is on history tag:
cvc-complex-type.2.4.b: The content of element 'history' is not complete.
One of '{WC[##any], "http://www.w3.org/2005/07/scxml":transition}' is
expected.

This has no sense because the transition element is present.

I have checked the schema:
    <xsd:group name="scxml.history.content">
        <xsd:sequence>
            <xsd:group ref="scxml.extra.content" minOccurs="0"
maxOccurs="unbounded"/>
            <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
            <xsd:group ref="scxml.extra.content" minOccurs="0"
maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:group>


and.. the curious point is if I delete the first group in the secuence...
the error disapears!!
    <xsd:group name="scxml.history.content">
        <xsd:sequence>
             <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
            <xsd:group ref="scxml.extra.content" minOccurs="0"
maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:group>

Any advice?
Received on Saturday, 24 November 2012 13:45:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 24 November 2012 13:45:42 GMT