Skip to content

SchematronProcessor

SchematronProcessor transforms DOM documents according to ISO Schematron validation and transformation rules into a document containing successful reports and failed assertions.

class SchematronProcessor extends ParameterHolder

ExtendsParameterHolder
Since1.0.0
SourceUtil/SchematronProcessor.php
ConstantValueDescription
NAMESPACE_SCHEMATRON_ISO'http://purl.oclc.org/dsdl/schematron'
NAMESPACE_SVRL_ISO'http://purl.oclc.org/dsdl/svrl'
NAMESPACE_XSL_1999'http://www.w3.org/1999/XSL/Transform'

public function __construct(?array<int, string> $chain = null): mixed

Creates a new processor for transforming documents into a Schematron report.

The list of Schematron implementation paths to process.

ParameterTypeDescription
$chain?``array``<``int``, ``string``>The list of Schematron implementation paths to process.

Returns mixed

MethodDescription
getProcessors(): array<int, QuioteXsltProcessor>Get an array of all processors.
setNode(DOMDocument $node): voidSets the document that this processor will transform and validate.
transform(DOMDocument $schema): DOMDocumentValidates the node against a given Schematron validation file.

public function getProcessors(): array<int, QuioteXsltProcessor>

Get an array of all processors.

Returns array``<``int``, QuioteXsltProcessor> — An array of XsltProcessor instances.

public function setNode(DOMDocument $node): void

Sets the document that this processor will transform and validate.

The document to use.

ParameterTypeDescription
$nodeDOMDocumentThe document to use.

public function transform(DOMDocument $schema): DOMDocument

Validates the node against a given Schematron validation file.

The validator to use.

ParameterTypeDescription
$schemaDOMDocumentThe validator to use.

Returns DOMDocument — The transformed validation document.

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
appendParameter()ParameterHolderAppend a parameter.
appendParameterByRef()ParameterHolderAppend a parameter by reference.
clearParameters()ParameterHolderClear all parameters associated with this request.
getFlatParameterNames()ParameterHolderRetrieve an array of flattened parameter names.
getParameter()ParameterHolderRetrieve a parameter.
getParameterNames()ParameterHolderRetrieve an array of parameter names.
getParameters()ParameterHolderRetrieve an array of parameters.
hasParameter()ParameterHolderIndicates whether or not a parameter exists.
removeParameter()ParameterHolderRemove a parameter.
reset()ParameterHolderRemoves every parameter held, leaving the holder empty for reuse.
setParameter()ParameterHolderSet a parameter.
setParameterByRef()ParameterHolderSet a parameter by reference.
setParameters()ParameterHolderSet an array of parameters.
setParametersByRef()ParameterHolderSet an array of parameters by reference.