SubstitutionGroupXSAnyTypeBinding loses maxOccurs and minOccurs in original
schemas
-----------------------------------------------------------------------------------
Key: GEOT-2471
URL: http://jira.codehaus.org/browse/GEOT-2471
Project: GeoTools
Issue Type: Bug
Components: ext xml-xsd
Affects Versions: 2.6-M2
Reporter: Rini Angreani
Fix For: 2.6-M2
Attachments: GEOT-2471.patch
See GEOT-2444: SubstitutionGroupXSAnyTypeBinding was added to handle encoding
property type pattern.
It was all good, however in the process, it overrides the original maxOccurs
and minOccurs from the schema.
Example:
Original schema: <xs:element name="lithology"
type="gsml:ControlledConceptPropertyType" maxOccurs="unbounded"/>
Lithology is defined as a collection here, but as it's of a property type
pattern (gsml:ControlledConceptPropertyType), SubstitutionGroupXSAnyTypeBinding
is then used. The class then creates a new XSDParticle, and since maxOccurs and
minOccurs aren't set to the original values, the default values would be used
(ie. maxOccurs = 1).
When the collection value is passed in during encoding, it is ignored since
it's expecting a single instance.. therefore the attribute is not encoded at
all.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel