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

Mukul Gandhi updated XERCESJ-1577:
----------------------------------
    Fix Version/s: 2.12.0

> Error when referencing substitution group with chameleon namespace
> ------------------------------------------------------------------
>
>                 Key: XERCESJ-1577
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1577
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Structures
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>            Assignee: Mukul Gandhi
>             Fix For: 2.12.0
>
>
> Tested with the libraries from the Xerces-J 2.11.0-xml-schema-1.1-beta 
> release.
> If I have a small schema in no-namespace like:
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> elementFormDefault="qualified">
>     <xs:element name="elem" substitutionGroup="p.trans"/>
>     <xs:element name="p.trans" abstract="true"/>
> </xs:schema>
> and a schema which has a target namespaces and includes it:
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> elementFormDefault="qualified" targetNamespace="mainNS" xmlns:ns="mainNS">
>     <xs:include schemaLocation="test.xsd"/>
> </xs:schema>
> Validation of the main schema (or of an XML referencing the XML schema) 
> reports the following problem:
> src-resolve.4.1: Error resolving component 'p.trans'. It was detected that 
> 'p.trans' has no namespace, but components with no target namespace are not 
> referenceable from schema document 
> 'file:/C:/Users/radu_coravu/Desktop/xsdProblem/test.xsd'. If 'p.trans' is 
> intended to have a namespace, perhaps a prefix needs to be provided. If it is 
> intended that 'p.trans' has no namespace, then an 'import' without a 
> "namespace" attribute should be added to 
> 'file:/C:/Users/radu_coravu/Desktop/xsdProblem/test.xsd'.
> Basically the reference to a substitution group which is in a chameleon 
> schema is not properly binded once the schema is included from a schema which 
> has a target namespace.
> This worked in Xerces 2.9.1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-dev-h...@xerces.apache.org

Reply via email to