Hi there,

it seems Xerces-J doesn't correctly support locally scoped elements.
I've tried to validate the following document and schema:

<?xml version="1.0"?>
<a
 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
 xsi:noNamespaceSchemaLocation="test.xsd"
>
    <elem>hello</elem>
</a>

<?xml version="1.0"?>
<schema>
    <complexType name="a-type">
        <element name="elem" type="string"/>
    </complexType>
    <element name="a" type="a-type"/>
    <complexType name="b-type">
        <element name="elem" type="string"/>
    </complexType>
    <element name="b" type="b-type"/>
</schema>

When I try to validate this, I get the following error message:

org.xml.sax.SAXParseException: Schema error: duplicate element decl in
the same
scope : elem.

As far as I understand the schema WD, both element declarations should
be scoped locally, so there shouldn't be a conflict. Could someone
please tell me if I got something wrong or if this is a bug/todo
feature?

Xerces-J version used: 1.1.2

Best regards

  Andreas Junghans

-- 
ISB GmbH                  Phone ++49 721 82800-40 or -0
Karlstraße 52-54          Fax   ++49 721 82800-82
76133 Karlsruhe           mailto:[EMAIL PROTECTED]
Germany                   http://www.isb-ka.de

Reply via email to