Need to extend existing ComplexType defined in XSD to accept empty strings from XML [message #1706087] |
Sat, 22 August 2015 04:39 |
suhas valanjoo Messages: 1 Registered: August 2015 |
Junior Member |
|
|
This is a a JAXB / XSD related problem. A complextype is defined as
<xsd:complexType name="IndustryDateTimeType">
<xsd:sequence>
<xsd:element name="Date" type="xsd:date"> </xsd:element>
<xsd:element minOccurs="0" name="Time" type="xsd:time"> </xsd:element>
</xsd:sequence>
</xsd:complexType>
The new requirement is that the date that is passed in XML could be an empty string, say,
<startdate></startdate>
where startdate is of type IndustryDateTimeType.
I figure I cannot have a union of a complexType and String - a simple type (allowing empty string). xsd:choice does not seem to be a good solution in this case. I have tried various combinations, but they are not working.
Also I cannot ask user to write xml element like this
<startdate
|
|
|
Powered by
FUDForum. Page generated in 0.02942 seconds