[xml] xmllint complains about non-determinist content model



I'm trying to write an XML schema that can specify a choice between
either element A alone, element B alone, or element A followed by
element B. E.g., something like the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <xsd:element name="person">
            <xsd:complexType>
                <xsd:choice>
                    <xsd:element ref="name"/>
                    <xsd:element ref="email"/>
                    <xsd:sequence>
                        <xsd:element ref="name"/>
                        <xsd:element ref="email"/>
                    </xsd:sequence>
                </xsd:choice>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="name"/>
        <xsd:element name="email"/>
    </xsd:schema>

But when I try to run this past xmllint, I get the error "Content model
of person is not determinist".

I've been scratching my head over this one for a while. As far as I can
tell, that's a deterministic content model. Is there a different way I
should be trying to do this?

Any advice would be much appreciated. xmllint --verion reports:

    xmllint: using libxml version 20603
       compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer
       XInclude Iconv Unicode Regexps Automata Schemas


-- 
Robin Munn
rmunn pobox com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]