XML schema validation with DSN_XMLVALIDATE
One way to do XML schema validation is by executing the DSN_XMLVALIDATE built-in function.
Before you can invoke DSN_XMLVALIDATE, all schema documents that make up an XML schema must be registered in the built-in XML schema repository (XSR). An XML schema provides the rules for a valid XML document.
DSN_XMLVALIDATE returns a value with the XML data type.
DSN_XMLVALIDATE(string-expression)
DSN_XMLVALIDATE(xml-expression)
DSN_XMLVALIDATE(string-expression, varchar-expression)
DSN_XMLVALIDATE(xml-expression, varchar-expression)
DSN_XMLVALIDATE(string-expression1, string-expression2, string-expression3)
DSN_XMLVALIDATE(xml-expression1, string-expression2, string-expression3)
For all forms,
the first parameter contains the document that you want to validate.For forms with one parameter, the target namespace and optional schema location of the XML schema must be in the root element of the instance document that you want to validate.
For forms with two parameters, the second parameter is the name of the schema object to use for validation of the document. That object must be registered in the XML schema repository.
For forms with three parameters, the second and third parameter contain the names of a namespace URI and a schema location hint that identify the XML schema object to use for validation of the document. That object must be registered in the XML schema repository.