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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How does XML DB handle XML Schema Validation ?

mdrake-OracleAug 24 2006 — edited Aug 24 2006
In order to validate an XML document against an XML Schema using Oracle XML DB the XML Schema must first be registered with XML DB using the method registerSchema provided by the package DBMS_XMLSCHEMA.

XDB provides two types of schema validation, 'Lax' Validation and 'Strict' Validation.

'Lax' validation takes place whenever a schema based document is converted from it's textual representation into the XML DB internal object model. Errors caught by this validation will be prefixed with 'ORA'.

'Stict' validation takes place when the XMLType methods schemaValidate() or isSchemaValid() are invoked.

The schemaValidate() method throws an exception with an error message indicating what is wrong it encounteres an invalid document. The error message associated with the exception will be prefixed with LSX.

The isSchemaValid() method returns true or false, depending on whether or not the document is valid. It cannot return any information about why the document is invalid.

The reason for having both the Lax and Strict validation models is that Strict validation is much more expensive in terms of CPU and memory usage than Lax validation.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 21 2006
Added on Aug 24 2006
4 comments
24,301 views