Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Need to extend existing ComplexType defined in XSD to accept empty strings from XML
Need to extend existing ComplexType defined in XSD to accept empty strings from XML [message #1706087] Sat, 22 August 2015 04:39
suhas valanjoo is currently offline suhas valanjooFriend
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
Previous Topic:Moxy cannot consume json content generated by itself
Next Topic:Descriptor for class was not found in the project"
Goto Forum:
  


Current Time: Mon Dec 30 16:42:41 GMT 2024

Powered by FUDForum. Page generated in 0.02942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top