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

Key: CASTOR-1967
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Werner Guttmann
Reporter: Richard Stokes
Votes: 0
Watchers: 0
Operations

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

Code generation from schema containing anonymous complex types

Created: 08/May/07 06:11 AM   Updated: 10/May/07 03:26 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 binding.xml (0.2 kb)
2. Zip Archive generated_code.zip (6 kb)
3. Zip Archive generated_code_1.0.1.zip (8 kb)
4. File IBConfiguration.xsd (0.9 kb)



 Description  « Hide
Code generated from schemas containing anonymous complex does not seem correct when default binding type is set to "type".

The attached schema (IBConfiguration.xsd) attempts to demonstrate the problem. Whenever code is generated from this schema (and warnings are enabled) the code generator gives the warning "Warning: A class name generation conflict has occured between element '/IBConfiguration/Servers' and element '/IBConfiguration'".

I've attached all the source files that are generated from this schema (generated_code.zip). A class has been generated for the top-level complex type, but classes haven't been generated for the anonymous complex types (which they were with version 1.0.1) and their elements. A strange class named "null" has been generated which appears to contain the code for one these complex types.Maybe each anonymous complex type is given the name "null"?

Sorry if I've missed any information, please let me know if you require anything else.

Best Regards,
Richard



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Werner Guttmann - 08/May/07 08:07 AM
With a previous version, what classes had been generated ?

Richard Stokes - 08/May/07 11:31 AM
I've attached the code generated by version 1.0.1.

After examing this code again I've realised that my initial description isn't quite correct. With 1.0.1 classes aren't generated for the anonymous complex types themselves, but for they elements they belong to.

Sorry for any confusion caused this caused.


Werner Guttmann - 09/May/07 07:00 AM
Is 1.0.1 really the last release which your XML schema is working with completely ? Just trying to get an idea as to how far I have to go back to check out old code and step through things.

Richard Stokes - 09/May/07 08:03 AM
It seems to be at version 1.0.4 that something changed. With 1.0.4 the generated code does not compile (I can attach the error and source if you like).

The behaviour of 1.0.5 seems to match 1.1.1.


Werner Guttmann - 10/May/07 03:26 AM
Thanks, that's already sufficient information. No need to attach anything.