[xml] Warning: complex type 'type_subelement': The content model is not determinist.
- From: "Wetzler, Thomas" <thomas wetzler siemens com>
- To: <xml gnome org>
- Subject: [xml] Warning: complex type 'type_subelement': The content model is not determinist.
- Date: Tue, 2 Aug 2005 15:59:47 +0200
Hi
there,
I've developed a
schema-definition with the tool "XML-Spy" on my workstation. It works fine
without any failures:
<?xml
version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:attributeGroup
name="controlsequences">
<xs:attribute name="pre"
type="xs:string"/>
<xs:attribute name="post"
type="xs:string"/>
</xs:attributeGroup>
<xs:complexType
name="type_subelement">
<xs:choice>
<xs:sequence>
<xs:element name="header" type="columns"
fixed="AN"/>
<xs:element name="content"
type="type_an"/>
</xs:sequence>
<xs:sequence>
<xs:element name="header" type="columns"
fixed="PN"/>
<xs:element name="content"
type="type_pn"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
<xs:simpleType
name="columns">
<xs:restriction
base="xs:string">
<xs:enumeration
value="AN"/>
<xs:enumeration value="PN"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType
name="type_an">
<xs:restriction
base="xs:string">
<xs:maxLength
value="80"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType
name="type_pn">
<xs:restriction
base="xs:string">
<xs:maxLength
value="1600"/>
</xs:restriction>
</xs:simpleType>
<xs:element
name="subelement"
type="type_subelement"/>
<xs:element
name="element">
<xs:complexType>
<xs:sequence>
<xs:element ref="subelement"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I like to user this
XML-Schema within a PHP5.0.4-programm with libxml2-2.6.20 to check incoming
data. When I try to check the data, the
parser complains
Warning: complex
type 'type_subelement': The content model is not determinist. in
/wir/searchservertest/src/load_db/xml_parser/FtcinCreator.php on line
37
Warning: Invalid
Schema in /wir/searchservertest/src/load_db/xml_parser/FtcinCreator.php on
line 37
Validate FAILED
The library seems to
have difficulties with the <xs:choice><xs:sequence>
combination. XML-Spy has no problem with that.
Does anyone have an
idear?
Thanks
Thomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]