[
https://issues.apache.org/jira/browse/XERCESC-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alberto Massari resolved XERCESC-1249.
--------------------------------------
Resolution: Fixed
Fix Version/s: 3.1.0
Assignee: Alberto Massari
A fix is in SVN
> Xerces complains about missing import namespace when it is imported within an
> included schema
> ---------------------------------------------------------------------------------------------
>
> Key: XERCESC-1249
> URL: https://issues.apache.org/jira/browse/XERCESC-1249
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (XML Schema)
> Affects Versions: 2.5.0
> Environment: Windows XP
> Reporter: Andrew Fang
> Assignee: Alberto Massari
> Fix For: 3.1.0
>
>
> Xerces emit error message:
> "Schema Representation Constraint: Namespace 'efg' is referenced without
> <import> declaration" when parsing the Schema attached below. Schema main.xsd
> has namespace "abc" and it refers to attribute defined in "efg" namespace.
> Although there is no <xsd:import> in main.xsd but it is declared in a file
> included in main.xsd (include.xsd). I believe that the file included using
> xsd:include is considered as part of the main.xsd, the error message above is
> not necessary.
> ****** main.xsd
> <xsd:schema
> targetNamespace="abc"
> xmlns:e="efg"
> xmlns="abc"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:include schemaLocation="include.xsd"/>
> <xsd:complexType name="S">
> <xsd:sequence>
> <xsd:element name="Title"/>
> </xsd:sequence>
> <xsd:attribute ref="e:attr"/>
> </xsd:complexType>
> </xsd:schema>
> ****** include.xsd
> <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:import
> namespace="efg"
> schemaLocation="import.xsd"/>
> </xsd:schema>
> ****** import.xsd
> <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="efg"
> xmlns="efg">
> <xsd:attribute name="attr">
> <xsd:simpleType>
> <xsd:restriction base="xsd:NMTOKENS"/>
> </xsd:simpleType>
> </xsd:attribute>
> </xsd:schema>
--
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]