class SchemaValidator (View source)

Methods

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

validateToNode(string|null $filename = null)

Validate an instance document supplied as a Source object with the validated document returned to the calling program.

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

Details

void setSourceNode(XdmNode $node)

The instance document to be validated. Supplied as an Xdm Node

Parameters

XdmNode $node

Return Value

void

void setOutputFile(string $fileName)

The instance document to be validated. Supplied file name is resolved and accessed

Parameters

string $fileName

Return Value

void

void registerSchemaFromFile(string $fileName)

Register the Schema which is given as file name.

Parameters

string $fileName

Return Value

void

void registerSchemaFromString(string $schemaStr)

Register the Schema which is given as a string representation.

Parameters

string $schemaStr

Return Value

void

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

Parameters

string|null $filename

The name of the file to be validated. $filename can be null, in that case it is assumed source document has already been supplied through accessor methods

Return Value

void

XdmNode validateToNode(string|null $filename = null)

Validate an instance document supplied as a Source object with the validated document returned to the calling program.

Parameters

string|null $filename

The name of the file to be validated. $filename can be null, in that case it is assumed source document has already been supplied through accessor methods

Return Value

XdmNode

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').

Return Value

XdmNode

void setParameter(string $name, XdmValue $value)

Set the parameters required for XQuery Processor

Parameters

string $name
XdmValue $value

Return Value

void

void setProperty(string $name, string $value)

Set properties for Schema Validator.

Parameters

string $name
string $value

Return Value

void

void clearParameters()

Clear parameter values set

Return Value

void

void clearProperties()

Clear property values set

Return Value

void

void exceptionClear()

Clear any exception thrown

Return Value

void

string getErrorCode(int $i)

Get the $i'th error code if there are any errors

Parameters

int $i

Return Value

string

string getErrorMessage(int $i)

Get the $i'th error message if there are any errors

Parameters

int $i

Return Value

string

int getExceptionCount()

Get number of error during execution of the validator

Return Value

int