Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML XSD DATE data type null value Validation

user11989926May 20 2010 — edited May 20 2010
Hi,

I am not able to define nullable date date type in xml such it passes xsd validation. Here't what I mean:

My xsd has TrxDate element defined as:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
..
..
<xsd:element name="TrxDate" type="xsd:date" nillable="true" />
..


Sample XML has TrxDate as follows(I am not passing any value):
*<TrxDate></TrxDate>*
..
..

Error message returned:


XML-24525: (Error) Invalid text '' in element: 'TrxDate' ]]>


I am using oracle.xml.parser.v2.SAXParser parser to do validation.

Any pointer will be highly appreaciated.

Thanks much.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2010
Added on May 20 2010
5 comments
9,489 views