[ 
https://issues.apache.org/jira/browse/XERCESJ-1624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich updated XERCESJ-1624:
------------------------------------------

    Summary: Wrong namepsace binding used for resolving QName prefix in an XSD  
(was: Element)

> Wrong namepsace binding used for resolving QName prefix in an XSD
> -----------------------------------------------------------------
>
>                 Key: XERCESJ-1624
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1624
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Structures, XML Schema 1.1 Structures
>    Affects Versions: 2.11.0
>            Reporter: Octavian Nadolu
>
> If I validate the following XML Schema, Xerces reports an error saying that 
> the element "m:elemInclude" is in namespace "someOtherNS". Which is wrong, 
> because the "elemInclude" is in namespace "targetNS". 
> This is because of the namespace declaration (xmlns:m="someOtherNS") added on 
> the "elemInclude" element declaration, which maps the "m" prefix to the 
> "someOtherNS" namespace. This namespace declaration overrides the namespece 
> declaration from the schema element (xmlns:m="targetNS"), but this should not 
> affect the namespace of the "elemInclude" element.
> I tested on the xml-schema-1.1-dev branch. 
> ---- XML Schema -------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema 
>     elementFormDefault="qualified" 
>     targetNamespace="targetNS" xmlns:m="targetNS" 
>     xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>     
>     <xs:element name="elemInclude" xmlns:m="someOtherNS">
>         <xs:complexType>
>             <xs:choice>
>                 <xs:element name="childInclude"/>
>             </xs:choice>
>         </xs:complexType>
>     </xs:element>
>     
>     <xs:element name="root">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element ref="m:elemInclude"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
> -----------------------------------



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to