castor

Validation of correct sequence of elements of <xsd.sequence> during unmarshalling

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1 M1, 1.1 M2
  • Fix Version/s: 1.1.1
  • Component/s: XML
  • Labels:
    None
  • Number of attachments :
    3

Description

During unmarshalling - in validating mode - Castor should not allow incorrect XML data that does not meet the sequence of elements as defined within an <xsd:sequence>.

  1. patch.c1811.20070107.txt
    07/Jan/07 8:23 AM
    36 kB
    Werner Guttmann
  2. patch.c1811.20070211.txt
    11/Feb/07 5:47 AM
    40 kB
    Werner Guttmann
  3. patch.c1811.samples.20070107.txt
    07/Jan/07 8:25 AM
    35 kB
    Werner Guttmann

Activity

Hide
Werner Guttmann added a comment -

Initial patch that adds support for this new validation.

Show
Werner Guttmann added a comment - Initial patch that adds support for this new validation.
Hide
Werner Guttmann added a comment -

JUnit tests relative to src/bugs that highlight the desired behaviour. Having said that, one test is still failing, and there's 9 tests broken within the CTF as a result of above patch .. . It looks like the concept(s) introduced will have to be 'rethought' for more complex structures, incl. references ....

Show
Werner Guttmann added a comment - JUnit tests relative to src/bugs that highlight the desired behaviour. Having said that, one test is still failing, and there's 9 tests broken within the CTF as a result of above patch .. . It looks like the concept(s) introduced will have to be 'rethought' for more complex structures, incl. references ....
Hide
Werner Guttmann added a comment -

Improved and final patch.

Show
Werner Guttmann added a comment - Improved and final patch.
Hide
Dmitry Savenko added a comment -

Is it possible to tune castor to allow unmarshalling for sequence of elements in incorrect order?

Show
Dmitry Savenko added a comment - Is it possible to tune castor to allow unmarshalling for sequence of elements in incorrect order?
Hide
Werner Guttmann added a comment -

Sequence validation only takes place

a) if validation is turned on during unmarshalling
b) if you are using classes generated during XML code generation.

Does this answer your question ?

Show
Werner Guttmann added a comment - Sequence validation only takes place a) if validation is turned on during unmarshalling b) if you are using classes generated during XML code generation. Does this answer your question ?
Hide
Werner Guttmann added a comment -

Or are you basically asking whether it would be possible to add a 'feature' that allows incorrect sequence with validation enabled ?

Show
Werner Guttmann added a comment - Or are you basically asking whether it would be possible to add a 'feature' that allows incorrect sequence with validation enabled ?
Hide
Dmitry Savenko added a comment -

Exactly, we need 'feature' that allows incorrect sequence with validation enabled.
We can't use new castor version because of
1. we have to validate during unmarshalling, but only in a such way we did it in old version (0.9.9)
2. the order in sequence doesn't matter for us, and indeed we couldn't change it now!

Show
Dmitry Savenko added a comment - Exactly, we need 'feature' that allows incorrect sequence with validation enabled. We can't use new castor version because of 1. we have to validate during unmarshalling, but only in a such way we did it in old version (0.9.9) 2. the order in sequence doesn't matter for us, and indeed we couldn't change it now!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
4h
Original Estimate - 4 hours
Remaining:
4h
Remaining Estimate - 4 hours
Logged:
Not Specified
Time Spent - Not Specified