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

Key: CASTOR-2268
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Werner Guttmann
Reporter: Joachim Grüneis
Votes: 0
Watchers: 0
Operations

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

Elements of type XML Schema list are not correctly handled

Created: 22/Jan/08 09:24 AM   Updated: 14/Mar/08 06:41 AM
Component/s: XML
Affects Version/s: None
Fix Version/s: 1.2

Time Tracking:
Issue & Sub-Tasks
Issue Only
Original Estimate: 8 hours, 30 minutes
Original Estimate - 8 hours, 30 minutes
Remaining Estimate: 55 minutes
Time Spent - 7 hours, 35 minutes Remaining Estimate - 55 minutes
Time Spent: 7 hours, 35 minutes
Time Spent - 7 hours, 35 minutes Remaining Estimate - 55 minutes

File Attachments: 1. Text File castor-xsd-list-test.txt (3 kb)
2. Text File patch.c2268.20080128-003.txt (31 kb)
3. Text File patch.c2268.20080128.txt (19 kb)
4. Text File patch.c2268.tests.20080128.txt (9 kb)

Environment: all

Testcase included: yes

Sub-Tasks  All   Open   

 Description  « Hide
Having an element of type xsd list would mean to marshal multiple values into a white-space separated list (instead of creating multiple elements!).
e.g.
<xl:XmlListElement>100 200 300 400 500</xl:XmlListElement>
should map to five values in
private java.util.Vector _xmlListElementList;
and is defined as:
<xs:simpleType name="multiValuedType">
<xs:list itemType="xs:integer" />
</xs:simpleType>

The test fails (qed), but maybe even the tests needs to be improved when a solution is implemented.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Werner Guttmann - 23/Jan/08 03:33 AM
As you know, currently I can produce a patch that allows Castor to marshal such lists successfully. On the unmarshalling side of things, it seems to be a bit trickier ... ;-(.

Werner Guttmann - 23/Jan/08 04:00 AM
In addition, I wonder whether this feature should be made available somehow in the mapping file, so that a user can select whether he wanted a multi-valued output within one field or an XML element per collection value.

Werner Guttmann - 28/Jan/08 02:41 AM
First patch for review. This patch handles the unmarshalling side of things only ....

Werner Guttmann - 28/Jan/08 02:43 AM
JUnit test case relative to codegen/src/test.

Werner Guttmann - 28/Jan/08 03:29 PM
Final patch for review. Covers unmarshalling and marshalling, as well as support for byte arrays.