[
https://issues.apache.org/jira/browse/CAMEL-5837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13606346#comment-13606346
]
Johan Mörén commented on CAMEL-5837:
------------------------------------
Managed to build from 2.11-SNAPSHOT from source and managed to start the route
successfully. When trying against my live-code however the fault persisted. I
then discovered that the schema import structure in the example wasn't quite
right. In my live-code and in the attached image both 1.xsd and 2.xsd imports
4.xsd. When i corrected 2.xsd to reflect this in the example code it refused to
run.
To fix 2.xsd please replace it's content with the following code:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="example.2">
<xs:import schemaLocation="../../common/3.xsd" namespace="example.3"/>
<xs:import schemaLocation="../common/4.xsd" namespace="example.4"/>
</xs:schema>
{code}
When debugging this i found that the baseURI, used as key in the relatedURIMap,
is not correct (the start and end of the path is correct but it is lacking path
elements in the middle). I'm not sure if this is the cause of the problem.
> Problem with nested schema imports when upgrading from 2.8.6 to 2.10.2
> ----------------------------------------------------------------------
>
> Key: CAMEL-5837
> URL: https://issues.apache.org/jira/browse/CAMEL-5837
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Environment: MacOS X, java 7
> Reporter: Johan Mörén
> Assignee: Willem Jiang
> Fix For: 2.10.4, 2.11.0
>
> Attachments: xsd-import_example 2.zip, xsd-import_example-reopen.zip,
> xsd_import_problem.png
>
>
> Hello
> I'm experiencing trouble with the validiator component when upgrading from
> 2.8.6 to 2.10.2.
> The problem seems to be related to imported schemas that does additional
> imports (all using relative paths). XSD A importing XSD B works fine. But if
> B in turn imports XSD C. That import seems to be resolved with the base path
> of A.
> All works fine in 2.8.6 but breaks when upgrading to 2.10.2.
> I will attach an example project where you can just switch version to verify
> the scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira