Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Non-deterministic schema

Reply
Thread Tools

Non-deterministic schema

 
 
Sahatra Kumara
Guest
Posts: n/a
 
      03-24-2005
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…

--
BTW: Put your finger on the Crux

Regards,
~Sahatra Kumara~
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with schema-validation and property "http://apache.org/xml/properties/schema/external-schemaLocation" Markus Java 1 11-23-2005 02:41 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM
Schema Metadata not a Metadata Schema Brett Selleck XML 1 09-04-2003 05:02 PM
Re: Convert DB2 schema to XML Schema Klaus Johannes Rusch XML 0 08-06-2003 11:23 AM



Advertisments