Validating XML in Schematron with PHP

There are many resources about Schematron ... however, I cannot find anything related or an example on how to check the xml on the Schematront.sch file.

Is anyone

I already found 1 or 2 very old classes that return errors ... so if anyone knows how to do this, please help.

+3
source share
1 answer

I am using the ANT parameter.

build.xml

<project name="myName" default="all" basedir=".">
  <taskdef name="schematron"
          classname="com.schematron.ant.SchematronTask"
          classpath="lib/ant-schematron-2010-04-14.jar;lib/saxon9he.jar"/>

  <target name="all" description="test it">
    <schematron schema="sch/test.sch" failonerror="false" debugMode="true">
      <fileset dir="./xml" includes="*.xml"/>
    </schematron>
  </target>

</project>

debugMode = true shows an intermediate XSLT file

+2
source

Source: https://habr.com/ru/post/1788347/


All Articles