castor

[XML Source generation] "ChosenChoice" element name for a list does not generate list based class

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.1
  • Fix Version/s: 1.1.1
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

Basically if i have a complex type with an element like:

<xs:sequence>
<xs:element name="ChosenChoice" type="ChosenChoice" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>

the generated source SHOULD create a class that has a vector to hold chosenchoice objects and have the normal add and remove methods etc... however it does not do this at all! It creates a class that holds a single chosenchoice object .

I've attached a unit test with two schemas testGood.xsd and testBad.xsd - they are nearly identical, except from the testGood.xsd file has an 'A' character appended to the element name which causes it to generate source as intended:

<....>
<xs:element name="ChosenChoiceA" type="ChosenChoice" minOccurs="0" maxOccurs="unbounded"/>
</....>

Issue Links

Activity

Hide
Simon Lord added a comment -

Woops in the testGood.xsd i've appended an 'A' to all instances of ChosenChoice instead of just the element name. It still doesn't work as described above - but it does seem to be based on the element name. Attaching new zip to reflect changes called srcgen-bugger.zip please use this one for testing with

Show
Simon Lord added a comment - Woops in the testGood.xsd i've appended an 'A' to all instances of ChosenChoice instead of just the element name. It still doesn't work as described above - but it does seem to be based on the element name. Attaching new zip to reflect changes called srcgen-bugger.zip please use this one for testing with
Hide
Steven Dolg added a comment -

This does not happen with trunk.

The changes made for issue 1880 (fixing problem with illegal field name suffix 'Choice') fix this one.

Show
Steven Dolg added a comment - This does not happen with trunk. The changes made for issue 1880 (fixing problem with illegal field name suffix 'Choice') fix this one.
Hide
Simon Lord added a comment -

Thanks for the heads up Steven, i'll go grab latest snapshot now.

Show
Simon Lord added a comment - Thanks for the heads up Steven, i'll go grab latest snapshot now.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: