S
Sahatra Kumara
I have the schema that was written by other people. This schema seems
to be wrong. Altova XML SPY 2005 and .Net have found out the block of
schema definition that contains error, namely non-determinism.
<xsd:complexType name="typeRequisite">
<xsd:sequence>
<xsd:choice>
<xsd:group ref="edmsi:SubRequisitesGroup"/>
<xsd:group ref="edmsi:SingleRequisiteValueGroup"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="SingleRequisiteValueGroup">
<xsd:sequence>
<xsd:element name="Value" type="xsd:anySimpleType"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="SubRequisitesGroup">
<xsd:sequence>
<xsd:element name="Value">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Requisite"
type="edmsi:typeRequisite" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:group>
I have listen that the processor doesn't take into account the type of
child elements while validating. Processors pay attention only to name
of the current element, not looking ahead. Thus I believe that it
isn't able to determine whether complex or simple Value should be used
at the current step without looking ahead. Really (thanks to
xml-tools), you see it is non-determinism.
As far as I can suppose, the following schema definition attempts to
describe the xml that is illustrated bellow:
<Value>
<Value>text</Value>
<Value>text</Value>
<Requisite>
<Value>text</Value>
<Requisite>
<Requisite>
<Value>text</Value>
</Requisite>
</Requisite>
</Requisite>
<Value>text</Value>
</Value>
I tried to change this schema declaration but I can't.
Moreover I don't want to seriously exchange this declaration because
these types are the basic ones in my (more than 930 lines) schema and
if I seriously change this block I will have to change everything.
But I have no idea how to change this schema neither by cardinal nor
by easy way.
I have rebuilt the same declarations in Relax NG in hope of performing
rewriting approach mentioned in Van der Vlist Relax NG book.
requisite = element requisite { value | requisite }
value = element value { text | ( value* & requisite* ) }
First of all, I don't want what to do with it
In the second place, «interleaved» is used, so it restrict ability to
port the possible solution in W3C Schema world.
Many thanks…
to be wrong. Altova XML SPY 2005 and .Net have found out the block of
schema definition that contains error, namely non-determinism.
<xsd:complexType name="typeRequisite">
<xsd:sequence>
<xsd:choice>
<xsd:group ref="edmsi:SubRequisitesGroup"/>
<xsd:group ref="edmsi:SingleRequisiteValueGroup"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="SingleRequisiteValueGroup">
<xsd:sequence>
<xsd:element name="Value" type="xsd:anySimpleType"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="SubRequisitesGroup">
<xsd:sequence>
<xsd:element name="Value">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Requisite"
type="edmsi:typeRequisite" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:group>
I have listen that the processor doesn't take into account the type of
child elements while validating. Processors pay attention only to name
of the current element, not looking ahead. Thus I believe that it
isn't able to determine whether complex or simple Value should be used
at the current step without looking ahead. Really (thanks to
xml-tools), you see it is non-determinism.
As far as I can suppose, the following schema definition attempts to
describe the xml that is illustrated bellow:
<Value>
<Value>text</Value>
<Value>text</Value>
<Requisite>
<Value>text</Value>
<Requisite>
<Requisite>
<Value>text</Value>
</Requisite>
</Requisite>
</Requisite>
<Value>text</Value>
</Value>
I tried to change this schema declaration but I can't.
Moreover I don't want to seriously exchange this declaration because
these types are the basic ones in my (more than 930 lines) schema and
if I seriously change this block I will have to change everything.
But I have no idea how to change this schema neither by cardinal nor
by easy way.
I have rebuilt the same declarations in Relax NG in hope of performing
rewriting approach mentioned in Van der Vlist Relax NG book.
requisite = element requisite { value | requisite }
value = element value { text | ( value* & requisite* ) }
First of all, I don't want what to do with it
In the second place, «interleaved» is used, so it restrict ability to
port the possible solution in W3C Schema world.
Many thanks…