Schema Validation Raises Incorrectly LSX-333 with PATTERN "\D{4}|\D{6}|\D{8}" and VALUE 999999 (Doc ID 1380715.1)

Last updated on NOVEMBER 25, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 and later   [Release: 11.1 and later ]
Information in this document applies to any platform.

Symptoms

I have registered a Schema that contains a specification for a Type as below:

<xsd:simpleType name="PartialDateType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4}|\d{6}|\d{8}"/>
</xsd:restriction>
</xsd:simpleType>

With that pattern, any of these three elements should be valid :

<documentDate>1234</documentDate>
<documentDate>123456</documentDate>
<documentDate>12345678</documentDate>

However, only the first element validates. The others raise LSX-333 error: literal "12345678" is not valid with respect to the pattern.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms