Misleading XSD-validation Error In 11.2.0.3 (Doc ID 1565055.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

schemavalidate() returns the following errors

ORA-31154: invalid XML document
ORA-19202: Error occurred in XML processing
LSX-00213 : only 0 occurrences of particle "PhysicalPerson", minimum is 1

when validating an XML file.

The error message is not really clear as the PhysicalPerson structure is
present in the XML.
But it is a subelement of the PhysicalPerson --> CompanyNumber - that should
raise a XSD-pattern violation (the length of Companynumber was 7):

This is the pattern:

<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{10}"/>
</xs:restriction>


And the subelement is

0123467

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