Changes

Jump to navigation Jump to search
664 bytes added ,  18:50, 10 August 2018
=Schematron Validation=
If you want to use Schematron for validating documents, simply install Vincent Lizzi’s excellent [https://github.com/Schematron/schematron-basex Schematron XQuery Module for BaseX]: <pre class="brush:xquery">repo:install('https://github.com/Schematron/schematron-basex/raw/master/dist/schematron-basex-1.2.xar')</pre> The following query illustrates how documents are validated. It is directly taken from the GitHub project: <pre class="brush:xquery">import module namespace schematron = "http://github.com/Schematron/schematron-basex"; let $sch := schematron:compile(doc('rules.sch'))let $svrl := schematron:validate(doc('document.xml'), $sch)return ( schematron:is-valid($svrl), for $message in schematron:messages($svrl) return concat(schematron:message-level($message), ': ', schematron:message-description($message)))</pre>
=Errors=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu