Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 54bb2b738197f974d30e8c29545074e7 > files > 7

jing-20091111-14.mga4.noarch.rpm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Jing task for Ant</title>
</head>
<body>
<h1>Jing task for Ant</h1>

<p><a href="http://ant.apache.org/">Ant</a> is a Java based
build tool, which is becoming the build tool of choice for Java-based
projects. Ant project files are written in XML.</p>

<p>Ant can be extended with new tasks. The Jing task for Ant allows
you to efficiently validate multiple files against multiple RELAX NG
patterns and integrate RELAX NG validation with other XML processing.</p>

<p>This version of the Jing task has bee tested with version 1.7.1 of
Ant.</p>

<p>To use the Jing task, you must include a <code>taskdef</code>
in your project file.</p>

<pre>&lt;taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/></pre>

<p>The <code>jing</code> task has a required <code>rngfile</code>
attribute which specifies the file containing the RELAX NG pattern. The
files to be validated can be specified in two ways: the
<code>jing</code> element may have a <code>file</code> attribute
specifying a single file to be validated; alternatively, the
<code>jing</code> element may have one or more <code>fileset</code>
child elements specifying sets of files to be validated. For
example:</p>

<pre>&lt;project name="example" default="validate" basedir=".">

  &lt;taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/>

  &lt;target name="validate">
    &lt;jing rngfile="xslt.rng">
      &lt;fileset dir="xsl" includes="**/*.xsl"/>
    &lt;/jing>
  &lt;/target>

&lt;/project></pre>

<p>The <code>jing</code> task also has two optional boolean attributes:</p>

<dl>
<dt><code>compactsyntax</code></dt>
<dd>if true, uses the compact syntax for the schema;
default is false</dd>

<dt><code>checkid</code></dt>
<dd>if true, checks for ID/IDREF/IDREFS compatibility;
default is true</dd>

</dl>

<p>When invoking Ant, you must ensure that <code>jing.jar</code> is in
your class path.</p>

</body>
</html>