bug in schema processing (using the "xsd:extension"  for an another file) since 
v2.8.0
--------------------------------------------------------------------------------------

                 Key: XERCESC-1776
                 URL: https://issues.apache.org/jira/browse/XERCESC-1776
             Project: Xerces-C++
          Issue Type: Bug
          Components: SAX/SAX2, Validating Parser (Schema) (Xerces 1.5 or up 
only)
    Affects Versions: 2.8.0, 3.0.0
         Environment: Linux  kernel 2.6.18-5-k7  i386
debian
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

            Reporter: Pawel Stawicki



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 "





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to