Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 54bb2b738197f974d30e8c29545074e7 > files > 10

jing-20091111-14.mga4.noarch.rpm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Jing</title>
</head>
<body>
<h1>Jing</h1>
<h2>A RELAX NG validator in Java</h2>

<p>Copyright &#169; 2001, 2002, 2003, 2008 Thai Open Source Software Center Ltd</p>

<p>See the file <a href="copying.html">copying.html</a> for copying
permission.</p>

<h3>Version 20091111</h3>

<p>This version of Jing implements</p>

<ul>

<li><a
href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">RELAX
NG 1.0 Specification</a>,</li>

<li><a
href="http://www.oasis-open.org/committees/relax-ng/compact-20021121.html"
>RELAX NG Compact Syntax</a>, and</li>

<li>parts of <a
href="http://www.oasis-open.org/committees/relax-ng/compatibility-20011203.html"
>RELAX NG DTD Compatibility</a>, specifically checking of
ID/IDREF/IDREFS.</li>

</ul>

<p>Jing also has experimental support for schema languages other than
RELAX NG; specifically</p>

<ul>
<li><a href="http://www.w3.org/TR/xmlschema-1/">W3C
XML Schema</a> (based on <a
href="http://xerces.apache.org/xerces2-j/">Xerces2-J</a>);</li>

<li><a href="http://xml.ascc.net/schematron">Schematron 1.5</a> (in a
future version of Jing, the support for Schematron will be updated to
support the
<a href="http://www.schematron.com">ISO-standardized version of
Schematron</a>);</li>

<li><a href="nrl.html">Namespace Routing Language</a> (in a future
version of Jing, the support for NRL will be updated to
support <a href="http://www.nvdl.org">NVDL</a>, which is an
ISO-standardized schema language based on NRL).</li>
</ul>

<p>A separate <a href="jing-other.html">document</a> describes this
support in more detail.</p>

<p>Jing has a command-line user interface.  It has no graphical user
interface.</p>

<p>Jing is available for download as the
file <a href="http://jing-trang.googlecode.com/files/jing-20091111.zip"
>jing-20091111.zip</a>, which contains binaries, source code and
documentation.  It requires a Java runtime compatible with the Java 2
Platform, Standard Edition (J2SE) version 1.4 (or any later version),
such as the Java Runtime Environment (JRE), which can be
downloaded <a href="http://java.sun.com/j2se/downloads.html">here</a>.</p>

<p>The latest version of Jing will always be available in
the <a href="http://code.google.com/p/jing-trang/downloads/list">Downloads</a>
section of the <a href="http://jing-trang.googlecode.com">project
site</a>.</p>

<p>Once you have installed a suitable Java runtime, you can run Jing
by using the command:</p>

<pre>java -jar jing.jar <var>options</var> <var>schema</var> <var>XMLfile</var>...</pre>

<p>where <code><var>schema</var></code> is the name of the file
containing the schema, and <code><var>XMLfile</var>...</code> are the
names of one or more XML files to be validated against this schema,
and <code><var>options</var></code> are zero or more
options. If <code><var>schema</var></code> is correct, and
each <code><var>XMLfile</var>...</code> is valid with respect to
<code><var>schema</var></code>, then Jing will generate no output.
Otherwise, it will generate one or more error messages.</p>

<p>The following options are available:</p>
<dl>

<dt><code>-c</code></dt>

<dd>The schema uses RELAX NG Compact Syntax.</dd>

<dt><code>-e <var>enc</var></code></dt>

<dd>Uses the encoding <code><var>enc</var></code> to read the
schema.</dd>

<dt><code>-f</code></dt>

<dd>Checks that the document is <em>feasibly valid</em>.  A document
is <em>feasibly valid</em> if it could be transformed into a valid
document by inserting any number of attributes and child elements
anywhere in the tree.  This is equivalent to transforming the schema
by wrapping every <code>data</code>, <code>list</code>,
<code>element</code> and <code>attribute</code> element in an
<code>optional</code> element and then validating against the
transformed schema. This option may be useful while a document is
still under construction.  This option also disables checking that for
every IDREF there is a corresponding ID.</dd>

<dt><code>-i</code></dt>

<dd>Disables checking of ID/IDREF/IDREFS. By default,
Jing enforces the constraints imposed by RELAX NG DTD Compatibility
with respect to ID/IDREF/IDREFS.</dd>

<dt><code>-t</code></dt>

<dd>Prints the time used by Jing for loading the schema and
for validation.</dd>

</dl>

<p>When you use <code>jing.jar</code> with the <code>-jar</code>
option, any jar files that have the same names as the jar files
included with the Jing download and are in the same directory
as <code>jing.jar</code> will be used automatically (i.e. they will be
added to the classpath), specifically:</p>

<ul>
<li><code>xercesImpl.jar</code></li>
<li><code>xml-apis.jar</code></li>
<li><code>saxon.jar</code></li>
<li><code>isorelax.jar</code></li>
</ul>

<p>Note that, when using the <code>-jar</code> option, the JRE will
ignore any additional class path entries specified by
the <code>-cp</code> or <code>-classpath</code> options or by
the <code>CLASSPATH</code> environment variable.</p>

<p>If you do not want use the <code>-jar</code> option (perhaps
because you want to use some other <code>.jar</code> files not
included with with Jing), then you must explicitly include all the
needed
<code>.jar</code> files with a <code>-cp</code> or
<code>-classpath</code> option or with the <code>CLASSPATH</code>
environment variable, and specify the main class name as
<code>com.thaiopensource.relaxng.util.Driver</code>.  For example,
on Linux you could do you could do:</p>

<pre>
java -classpath <var>path-to-dist</var>/jing-20091111/bin/jing.jar com.thaiopensource.relaxng.util.Driver <var>file</var>.rng <var>file</var>.xml
</pre>

<p>This would use just <code>jing.jar</code> and the standard Java
classes.</p>

<p>Jing uses a vendor-independent <a
href="pluggable-datatypes.html">pluggable datatypes API</a> that
allows datatype libraries to be added at runtime and be interoperable
with Java-based RELAX NG implementation that supports the API.</p>

<p>Jing also includes an implementation of a datatype library for the
W3C XML Schema Part 2 datatypes.  There is a separate <a
href="jing-datatypes.html">document</a> describing this implementation
and how to use it.</p>

<p>If you wish to use Jing in your programs, you have a choice.</p>

<ul>

<li>You can use Jing's <a href="api/jing/index.html">native
API</a>.</li>

<li>You can use JARV (Java API for RELAX Verifiers).  JARV is part of
the <a href="http://iso-relax.sourceforge.net">ISO-RELAX</a>
SourceForge project.  Jing's implementation uses
the <a href="http://downloads.sourceforge.net/iso-relax/isorelax.20041111.zip"
>20041111 version</a>. Support for DTD Compatibility validation of
ID/IDREF and for validation with languages other than RELAX NG is not
currently available via this interface.</li>

</ul>

<p>There is a <a href="jing-ant.html">Jing task</a> that allows Jing
to be invoked by the <a href="http://ant.apache.org/">Ant</a>
build tool.</p>

<p>Development of Jing, together
with <a href="http://www.thaiopensource.com/relaxng/trang.html">Trang</a>,
takes place in
the <a href="http://jing-trang.googlecode.com">jing-trang project</a>,
which is hosted on Google Code.</p>

<p>If you find a bug or would like to request an enhancement, please
create a new issue in
the <a href="http://code.google.com/p/jing-trang/issues/list">Issues</a>
section of the project site. You can talk with other users of Jing
on
the <a href="http://tech.groups.yahoo.com/group/rng-users/">rng-users</a>
mailing list.</p>

<p>If you want to make changes to Jing, you
should <a href="http://code.google.com/p/jing-trang/source/checkout">check
out</a> the source code from the project's Subversion repository. (The
source code included in the Jing download is for reference purposes,
and doesn't contain the supporting files, such as build scripts and
test cases, that are needed for working conveniently with the source
code.)</p>

<address><a href="mailto:jjc@jclark.com">James Clark</a></address>

</body>
</html>