History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CASTOR-1993
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Werner Guttmann
Reporter: Mattias Jiderhamn
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
castor

Use of types within included file doesn't work if binding file binds no namespace

Created: 01/Jun/07 04:29 AM   Updated: 21/Jun/07 04:49 AM
Component/s: XML code generator
Affects Version/s: 1.1.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. XML File build.xml (2 kb)
2. XML File complex.xsd (0.6 kb)
3. XML File mapping-binding.xml (0.5 kb)
4. XML File schema.xsd (0.6 kb)



 Description  « Hide
If schema A defines simple type S and complex type C, which uses type S, everything is fine of course.
Although, if schema A is imported by schema B AND the binding file has a binding for no namespace, the code generated from schema B will be invalid. The reference from C to S will use the package name of no namespace!

This is a big problem if schema B does not have a target namespace, and thus no namespace needs to be mapped to a package.

See attached files to demonstrate the problem.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Mattias Jiderhamn - 01/Jun/07 07:37 AM
It works fine if the imported schema has elementFormDefault="qualified"...

Werner Guttmann - 01/Jun/07 01:43 PM
It could be that this issue is related to CASTOR-1934 (and thus to those linked form there). But I am not 100% sure. There's definitely a bug with form qualification and (default) (namespace to) package mappings, but let's see ...

Werner Guttmann - 01/Jun/07 02:09 PM
Mattias, having a look at the binding file provided, I wonder why you are including a namespace to package mapping such as

<cbf:package>
<cbf:name>test.foo</cbf:name>
<cbf:namespace />
</cbf:package>

at all ?


Mattias Jiderhamn - 21/Jun/07 04:49 AM
[Not getting any e-mail when Werner commented...]

I guess I over simplified the example. In my real case the "complex.xsd" is in turn imported by another Schema which has no target namespace. I want to map a package for those classes.