Skip to Main Content

Database Software

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!

schemavalidate and dateTime pattern

756241Mar 8 2010 — edited Aug 5 2010
Hello,

When I try to validate an xml schema using the snippet below, I get the following exception:
-ORA-31154: invalid XML-document
ORA-19202: Error in XML-processing (
LSX-00333:literal "is 2001-01-01T21: 34:00.000000" is not valid with respect to the pattern
ORA-06512: in "SYS.XMLTYPE", line 354
my xsb is:
.
.
.
<xs:element name="Create_Time" nillable="false">

<xs:simpleType>

<xs:restriction base="xs:dateTime">

<xs:pattern value="\d\d\d\d-\d\d-\d\dT\d\d:\d\d:00"/>

</xs:restriction>

</xs:simpleType>

</xs:element>
.
.
.
and i get my CreateTime hat this format(with a select) to_char(myTable.CREATE_TIME,'YYYY-MM-DD"T"HH24:MI":00"')
<Create_Time>2001-01-01T21:34:00.000000</Create_Time>
is the problem with fraction of second".000000"? Is there a way to validate the schema without modifying the schema definition?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2010
Added on Mar 8 2010
6 comments
3,577 views