RE: [xml] xmllint complains about non-determinist content model
- From: "Srihari Kondapaneni" <Srihari Kondapaneni procket com>
- To: "Robin Munn" <rmunn pobox com>, <xml gnome org>
- Subject: RE: [xml] xmllint complains about non-determinist content model
- Date: Tue, 23 Dec 2003 11:02:31 -0800
You can try to do this..
<?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:sequence>
<xsd:element ref="name"/>
<xsd:element ref="email" minOccurs=0/>
</xsd:sequence>
<xsd:element ref="email"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="name"/>
<xsd:element name="email"/>
</xsd:schema>
Srihari.K
-----Original Message-----
From: Robin Munn [mailto:rmunn pobox com]
Sent: Tuesday, December 23, 2003 10:34 AM
To: xml gnome org
Subject: [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
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]