Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.8.0, 3.0.0
-
None
-
Linux kernel 2.6.18-5-k7 i386
debian
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Description
I have 2 schema files:
1. smerf.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:g="http://gargamel" targetNamespace="http://smerf" elementFormDefault="qualified">
<import namespace="http://gargamel" schemaLocation="gargamel.xsd" />
<element name="Alert" > <!-- type="g:gargamelType"> -->
<complexType>
<complexContent>
<extension base="g:gargamelType" />
</complexContent>
</complexType>
</element>
</schema>
2.gargamel.xsd :
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://gargamel" elementFormDefault="qualified" >
<xsd:complexType name="gargamelType">
<xsd:sequence>
<xsd:element name="Data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Object" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
when i try to parse my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<s:Alert xmlns:s="http://smerf" xmlns:g="http://gargamel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation='http://smerf smerf.xsd' >
<g:Data>
<g:Object>
pawel
</g:Object>
</g:Data>
</s:Alert>
I get an error:
- SAX2Print -v=always test.xml
<?xml version="1.0" encoding="LATIN1"?>
<s:Alert xsi:schemaLocation="http://smerf smerf.xsd">
<g:Data>
Cannot load message domain
this error is generated by the "trunk" version of xerces-c (r616373)
a similar error occur i version 2.8.0 but not in 2.7.0
It happens only when the element "Alert" is an "xsd:extension" for "gargamelType" no when:
<element name="Alert" type="g:gargamelType"/>
in version 2.8.0 I get (when using the SAX2 api):
Xml:While parsing: Xerces-c error: At line 31, char 50, Unknown element
'g:Object', std "