SchemaValidator
class SchemaValidator (View source)
Methods
The instance document to be validated. Supplied file name is resolved and accessed
Register the Schema which is given as file name.
Register the Schema which is given as a string representation.
Validate an instance document supplied as a Source object. Assume source document has already been supplied through accessor methods
Validate an instance document supplied as a Source object with the validated document returned to the calling program.
Get the validation report produced after validating the source document. The reporting feature is switched on via setting the property on the {@link SchemaValidator): $validator->setProperty('report', 'true').
Set properties for Schema Validator.
Clear parameter values set
Clear property values set
Clear any exception thrown
Get the $i'th error code if there are any errors
Get the $i'th error message if there are any errors
Get number of error during execution of the validator
Details
void
setSourceNode(XdmNode $node)
The instance document to be validated. Supplied as an Xdm Node
void
setOutputFile(string $fileName)
The instance document to be validated. Supplied file name is resolved and accessed
void
registerSchemaFromFile(string $fileName)
Register the Schema which is given as file name.
void
registerSchemaFromString(string $schemaStr)
Register the Schema which is given as a string representation.
void
validate(string|null $filename = null)
Validate an instance document supplied as a Source object. Assume source document has already been supplied through accessor methods
XdmNode
validateToNode(string|null $filename = null)
Validate an instance document supplied as a Source object with the validated document returned to the calling program.
XdmNode
getValidationReport()
Get the validation report produced after validating the source document. The reporting feature is switched on via setting the property on the {@link SchemaValidator): $validator->setProperty('report', 'true').
void
setParameter(string $name, XdmValue $value)
Set the parameters required for XQuery Processor
void
setProperty(string $name, string $value)
Set properties for Schema Validator.
void
clearParameters()
Clear parameter values set
void
clearProperties()
Clear property values set
void
exceptionClear()
Clear any exception thrown
string
getErrorCode(int $i)
Get the $i'th error code if there are any errors
string
getErrorMessage(int $i)
Get the $i'th error message if there are any errors
int
getExceptionCount()
Get number of error during execution of the validator