castor

Elements of type XML Schema list are not correctly handled

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.2
  • Component/s: XML
  • Labels:
    None
  • Environment:
    all
  • Testcase included:
    yes
  • Number of attachments :
    4

Description

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.

  1. castor-xsd-list-test.txt
    22/Jan/08 9:24 AM
    3 kB
    Joachim Grüneis
  2. patch.c2268.20080128.txt
    28/Jan/08 2:41 AM
    19 kB
    Werner Guttmann
  3. patch.c2268.20080128-003.txt
    28/Jan/08 3:29 PM
    31 kB
    Werner Guttmann
  4. patch.c2268.tests.20080128.txt
    28/Jan/08 2:43 AM
    9 kB
    Werner Guttmann

Activity

Hide
Werner Guttmann added a comment -

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 ... ;-(.

Show
Werner Guttmann added a comment - 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 ... ;-(.
Hide
Werner Guttmann added a comment -

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.

Show
Werner Guttmann added a comment - 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.
Hide
Werner Guttmann added a comment -

First patch for review. This patch handles the unmarshalling side of things only ....

Show
Werner Guttmann added a comment - First patch for review. This patch handles the unmarshalling side of things only ....
Hide
Werner Guttmann added a comment -

JUnit test case relative to codegen/src/test.

Show
Werner Guttmann added a comment - JUnit test case relative to codegen/src/test.
Hide
Werner Guttmann added a comment -

Final patch for review. Covers unmarshalling and marshalling, as well as support for byte arrays.

Show
Werner Guttmann added a comment - Final patch for review. Covers unmarshalling and marshalling, as well as support for byte arrays.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
8h 30m
Original Estimate - 8 hours, 30 minutes
Remaining:
55m
Time Spent - 7 hours, 35 minutes Remaining Estimate - 55 minutes
Logged:
7h 35m
Time Spent - 7 hours, 35 minutes Remaining Estimate - 55 minutes