W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

parsing ambiguous schema

From: Lingzhi Zhang <lzhang@cse.ogi.edu>
Date: Fri, 21 Mar 2003 01:45:32 -0800 (PST)
To: dev xmlschema <xmlschema-dev@w3.org>
Message-ID: <Pine.SOL.4.21.0303210141160.6468-100000@state.cse.ogi.edu>


below is a non-deterministic schema, it is unable to determine,
without looking ahead to the next element, if the apple element is
the first part of the sequence of apple and berry or the first part
of the sequence of apple and coffee. which parser could parse xml document
agains this kind of schema?

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="rootTypes" />
<xs:complexType name="myKitchen">
        <xs:choice>
            <xs:sequence>
                <xs:element name="apple"/>
                <xs:element name="berry"/>
            </xs:sequence>
            <xs:sequence>
                <xs:element name="apple"/>
                <xs:element name="coffee"/>
            </xs:sequence>
        </xs:choice>
    </xs:complexType>
</xs:schema>
Received on Friday, 21 March 2003 05:10:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT