It has nothing to do with the second module.
section must come before module_type (you have it last)
John
_______________________________________________________
John Anderson
CTO BarbadosoftTM
The XML Management Company
+31 (0)20 750 7582 / +31 (0)6 65 347 448 / www.barbadosoft.com
- putting the "X" in "XML" -
-----Original Message-----
From: Javier A. Soltero [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2001 01:17
To: [EMAIL PROTECTED]
Subject: Help with Schema Validation Behavior
Hi,
I've run into a problem with schema validation. From what I can see, the
validation behavior changes depending on the presence of a particular
element. After parsing a <module> element which a child <section> element
(such as the first one in the example below), it throws a SAXParseException
when it encounters the next <module> element with the following message:
org.xml.sax.SAXParseException: The content of element type "module" must
match
"(vendor,name,symbolic_name,so_name,cmp_rel_path?,dest_path?,bundle_name,vhost_uri?,guid,server_uri,sequence,section?,module_type)"
When there are no <module> elements with <section> children, the validation
works correctly.
This is a fragment of what I am trying to validate:
<module uri="module/mod_jk/752e23b0-0a00-00c9-6430-1d1b9e2893e2">
<vendor>Covalent</vendor>
<name>mod_jk</name>
<symbolic_name>jk_module</symbolic_name>
<so_name>mod_jk.so</so_name>
<cmp_rel_path />
<dest_path />
<bundle_name>ers-1.0.tar.gz</bundle_name>
<guid>752e23b0-0a00-00c9-6430-1d1b9e2893e2</guid>
<server_uri uri="server/covalent-admin-TestServer" />
<sequence>0</sequence>
<module_type uri="module/mod_jk" />
<section uri="752e23b0-0a00-00c9-6430-1d1b28cc4edd">
<![CDATA[JkMount /jspui ajp13]]>
</section>
</module>
<module uri="module/mod_rewrite/GUID_REWRITE_SERVER_101">
<vendor>Covalent</vendor>
<name>mod_rewrite</name>
<symbolic_name>rewrite_module</symbolic_name>
<so_name>mod_rewrite.so</so_name>
<cmp_rel_path />
<dest_path />
<bundle_name>ers-1.0.tar.gz</bundle_name>
<guid>GUID_REWRITE_SERVER_101</guid>
<server_uri uri="server/covalent-admin-TestServer" />
<sequence>0</sequence>
<module_type uri="module/mod_rewrite" />
</module>
This is the schema section that describes the <module> complex type:
<xsd:complexType name="moduleType">
<xsd:sequence>
<xsd:element name="vendor" type="vendorType" />
<xsd:element name="name" type="nameType" />
<xsd:element name="symbolic_name" type="symbolic_nameType" />
<xsd:element name="so_name" type="so_nameType" />
<xsd:element name="cmp_rel_path" type="cmp_rel_pathType"
minOccurs="0" maxOccurs="1" />
<xsd:element name="dest_path" type="dest_pathType" minOccurs="0"
maxOccurs="1" />
<xsd:element name="bundle_name" type="bundle_nameType" />
<xsd:element name="vhost_uri" type="vhost_uriType" minOccurs="0"
maxOccurs="1" />
<xsd:element name="guid" type="guidType" />
<xsd:element name="server_uri" type="server_uriType" />
<xsd:element name="sequence" type="sequenceType" />
<xsd:element name="section" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:normalizedString">
<xsd:attribute name="uri" type="uriType"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="module_type" type="module_typeType" />
</xsd:sequence>
<xsd:attribute name="uri" type="uriType" />
</xsd:complexType>
Any help will be greatly appreciated.
Thanks.
javier
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The information transmitted by this e-mail message is intended solely for the use of the person to whom or entity to which it is addressed. The message may contain information that is privileged and confidential. Disclosure, dissemination, distribution, review, retransmission to, other use of or taking any action in reliance upon this information by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message.
Although we have taken precautions to minimize the risk of transmitting viruses we nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by viruses.
