4

Schematron に関するリソースはたくさんありますが、関連するものや、Schematront .sch ファイルに対して xml を検証する方法の例は見つかりません。

誰?

エラーを返す非常に古いクラスが 1 つまたは 2 つ見つかりました。

4

1 に答える 1

2

「ANT」オプションを使用します。

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 は中間 XSLT ファイルを表示します

于 2011-04-05T12:28:09.203 に答える