New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xs:include without targetNamespace (chameleon schema) doesn't work #102

Closed
eed3si9n opened this Issue Oct 25, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@eed3si9n
Owner

eed3si9n commented Oct 25, 2011

originally reported by @berntan

steps

  1. define schema B without targetNamesapce.
  2. define schema A that calls xs:include to include schema B.
  3. compile them.

problem

referenced complex type not found.

expectation

schema B is automatically interpreted to be in the same namespace as schema A.

note

see http://www.kohsuke.org/xmlschema/XMLSchemaDOsAndDONTs.html#avoid_chameleon

see https://github.com/eed3si9n/scalaxb-sample/tree/ergogroup/detsentralefolkeregister

also see XML Schema:

The XML Schema corresponding to <schema> contains not only the components corresponding to its definition and declaration [children], but also all the components of all the XML Schemas corresponding to any <include>d schema documents. Such included schema documents must either (a) have the same targetNamespace as the <include>ing schema document, or (b) no targetNamespace at all, in which case the <include>d schema document is converted to the <include>ing schema document's targetNamespace.

@eed3si9n eed3si9n closed this in b25db4f Oct 31, 2011

eed3si9n added a commit that referenced this issue Nov 10, 2011

fixed schema addition of embedded xsd within wsdl
this is a fix for changes made for #102.
since wsdl can contain multiple xsd schemas within
it, they need to be tagged differently.

@eed3si9n eed3si9n reopened this May 10, 2013

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n May 10, 2013

Owner

This is happening again with some other schema by erogoroup: https://github.com/eed3si9n/scalaxb-sample/tree/ergogroup2/ergogroup2, reported as Program parsing wsdl
.

Owner

eed3si9n commented May 10, 2013

This is happening again with some other schema by erogoroup: https://github.com/eed3si9n/scalaxb-sample/tree/ergogroup2/ergogroup2, reported as Program parsing wsdl
.

@eed3si9n eed3si9n closed this in aff4343 Jul 7, 2013

eed3si9n added a commit that referenced this issue Jul 7, 2013

yet another attempt to tame the chameleon. fixes #102
previous workaround modified the parsing process to
resolve QName and treated unbound namespace as the outer one.
this trick does not work when a particular file
is imported more than once to different namespaces.
this time around, I am rewriting the file content and
reparsing it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment