Download the PHP package milo/schematron without Composer
On this page you can find all versions of the php package milo/schematron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download milo/schematron
More information about milo/schematron
Files in milo/schematron
Package schematron
Short Description Implementation of ISO Schematron with Schematron 1.5 back compatibility. Library does not need any XSLT.
License BSD-3-Clause GPL-2.0 GPL-3.0 MIT
Informations about the package schematron
Schematron
This library is an implementation of the ISO Schematron (with Schematron 1.5 back compatibility). It is done by pure DOM processing and does not require any XSLT sheets nor XSLT PHP extension. It was a requirement for a development.
Usage
Install the Schematron by the Composer or download a release package.
Format of the Schematron::validate()
result depends on its second argument. E.g. an imaginary results:
A validation phase can be passed by 3rd argument:
Schematron performs a schema namespace (ISO or v1.5) autodetection but the namespace can be passed manually:
By Schematron::setOptions($options)
you can adjust the Schematron behaviour. The $options is a mask of following flags:
An <sch:include>
processing is affected by setting Schematron::setAllowedInclude($allowed)
mask which permits types of include uri and Schematron::setMaxIncludeDepth($depth)
:
And two basic attributes of loaded schema are accesible over:
Licence
You may use all files under the terms of the New BSD Licence, or the GNU Public Licence (GPL) version 2 or 3, or the MIT Licence.
Tests
The Schematron tests are written for Nette Tester. Two steps are required to run them:
All versions of schematron with dependencies
ext-dom Version *