Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:thomas-schraitle
msv
msv.xml.in
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File msv.xml.in of Package msv
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd"> <refentry lang="en"> <refentryinfo> <productname>msv</productname> </refentryinfo> <refmeta> <refentrytitle>msv</refentrytitle> <manvolnum>1</manvolnum> <refmiscinfo class="version">@VERSION@</refmiscinfo> <refmiscinfo class="source">https://msv.dev.java.net/</refmiscinfo> <refmiscinfo class="manual">/usr/share/doc/packages/msv</refmiscinfo> </refmeta> <refnamediv> <refname>msv</refname> <refpurpose>Validating XML files with DTD, RELAX NG, RELAX, TREX or W3C Schema</refpurpose> </refnamediv> <refsynopsisdiv> <title>Synopsis</title> <cmdsynopsis> <command>msv</command> <arg choice="opt">options</arg> <arg choice="plain">grammar</arg> <arg choice="plain">instance1</arg> <arg choice="opt">instance2...</arg> </cmdsynopsis> </refsynopsisdiv> <refsect1> <title>Description</title> <para>The Sun Multi-Schema Validator(MSV) is a <trademark>Java</trademark> technology tool to validate XML documents against a variety of XML schemata. It supports RELAX Namespace, RELAX Core, RELAX NG, TREX, XML DTDs, and a subset of W3C XML Schema Part 1.</para> </refsect1> <refsect1 id="msv.usage"> <title>Usage</title> <para>To validate XML documents with a RELAX grammar/module, enter a command of the following form:</para> <screen><prompt>$ </prompt>java -jar msv.jar MySchema.rxg MyDocument1.xml MyDocument2.xml ...</screen> <para>If you'd like to use TREX, enter a command of the form:</para> <screen><prompt>$ </prompt>java -jar msv.jar MySchema.trex MyDocument1.xml MyDocument2.xml ...</screen> <para>Or if you'd like to use W3C XML Schema, enter the command:</para> <screen>java -jar msv.jar MySchema.xsd MyDocument1.xml MyDocument2.xml ...</screen> <para>MSV will detect the schema language regardless of its file extension if the schema is written in XML syntax.</para> <para>However, DTD is only one exception. MSV relies on the file extension <filename class="extension">.dtd</filename> to detect XML DTDs. That means you have to have the <filename class="extension">.dtd</filename> extension for your DTDs. To validate XMLs with a DTD, enter the command:</para> <screen><prompt>$ </prompt>java -jar msv.jar my.dtd MyDocument1.xml MyDocument2.xml ...</screen> <para>Some environments support wild cards for filenames, while others (e.g., "jview" VM from Microsoft) don't. You can also use a URL instead of a filename.</para> <para>If the schema contains errors, you will see messages like this.</para> <screen>start parsing a grammar. the following hedgeRules form an infinite recursion ( y > z > y ) 18:23@file:///c:/work/relax/relax024.e.rlx 14:23@file:///c:/work/relax/relax024.e.rlx failed to load a grammar.</screen> <para>18:23@XYZ indicates that the error is located at line 18, column 23 of file XYZ.</para> <para>If the document and the schema are both valid, you will see messages like this:</para> <screen>start parsing a grammar. validating c:\work\relax\relax001.v00.xml the document is valid.</screen> <para>If the schema is valid but the document has errors, you will see messages like this:</para> <screen>start parsing a grammar. validating c:\work\relax\relax001.n02.xml Error at line:5, column:5 of file:///c:/work/relax/relax001.n02.xml tag name "q" is not allowed. possible tag names are: the document is NOT valid.</screen> <para>Please note that line/column infomation is sometimes inaccurate, and one tab char is counted as one character, not 4 or 8. So you might want to look around to find the actual error.</para> </refsect1> <refsect1 id="msv.options"> <title>Options</title> <variablelist> <varlistentry> <term><option>-catalog</option> <parameter>catalogfile</parameter></term> <listitem> <para>use a catalog file (TR9401) to resolve external entities for detail, see http://www.sun.com/xml/developers/resolver/</para> </listitem> </varlistentry> <varlistentry> <term><option>-classpath</option> <parameter>jar</parameter>/<parameter>dir</parameter></term> <listitem> <para>use this option to specify additional datatype library jar files for RELAX NG validation. Can be specified multiple times</para> </listitem> </varlistentry> <varlistentry> <term><option>-crimson</option></term> <listitem> <para>use Crimson parser for parsing grammar and instances.</para> </listitem> </varlistentry> <varlistentry> <term><option>-debug</option></term> <listitem> <para>generate debug messages.</para> </listitem> </varlistentry> <varlistentry> <term><option>-dump</option></term> <listitem> <para>dump grammar rather than perform validation.</para> </listitem> </varlistentry> <varlistentry> <term><option>-locale</option> <parameter>code</parameter></term> <listitem> <para>set the language of messages (for example, <token>en</token>, <token>ja</token>)</para> </listitem> </varlistentry> <varlistentry> <term><option>-maxerror</option></term> <listitem> <para>try to report more errors even if they may be false.</para> </listitem> </varlistentry> <varlistentry> <term><option>-oraclev2</option></term> <listitem> <para>use OrcaleV2 parser for parsing grammar and instances.</para> </listitem> </varlistentry> <varlistentry> <term><option>-standalone</option></term> <listitem> <para>do not read external DTD specified in grammar/instances.</para> </listitem> </varlistentry> <varlistentry> <term><option>-strict</option></term> <listitem> <para>perform extra check to schema and report error.</para> </listitem> </varlistentry> <varlistentry> <term><option>-verbose</option></term> <listitem> <para>be verbose</para> </listitem> </varlistentry> <varlistentry> <term><option>-warning</option></term> <listitem> <para>display all warning messages</para> </listitem> </varlistentry> <varlistentry> <term><option>-xerces</option></term> <listitem> <para>use Xerces-J parser for parsing grammar and instances.</para> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 id="msv.knownlimitations"> <title>Known Limitations</title> <para/> <refsect2> <title>DTD</title> <orderedlist> <listitem> <para>Attribute declarations of the form of <sgmltag class="attribute" >xmlns</sgmltag> are ignored. All namespace declarations within the instance document are also ignored.</para> </listitem> <listitem> <para>The detection of XML DTD is based on the file extension. This causes a problem when you are using MSV through JARV or <interface>GrammarLoader</interface>. For details, see this.</para> </listitem> <listitem> <para>In general, MSV handles XML namespaces differently from most DTD validators. As a result, MSV may validate documents that other DTD validators reject. When this is the case, MSV always issues a warning.</para> </listitem> <listitem> <para>Strictly speaking, MSV cannot replace XML parser's DTD validation because DTD validation affects lot of other things. For example, DTD validation in XML parser can expand entity references and provides default attribute values; DTD validation by MSV doesn't do those things.</para> </listitem> </orderedlist> </refsect2> <refsect2> <title>TREX</title> <para>This implementation fully conforms to the <ulink url="http://thaiopensource.com/trex/spec.html">current specification (2001-02-13 version)</ulink>.</para> </refsect2> <refsect2> <title>RELAX NG</title> <para>This implementation is intended to almost fully implement the spec (Aug,11,2001 version) except the followings:</para> <itemizedlist> <listitem> <para>recursive self reference check is performed after <sgmltag>notAllowed</sgmltag> is expanded. Therefore MSV fails to catch some of the error. (section 4.18 of the spec.)</para> </listitem> </itemizedlist> <para>MSV supports <ulink url="http://www.oasis-open.org/committees/relax-ng/compatibility-20010907.html" >RELAX NG DTD Compatibility Spec (2001/09/07)</ulink>. MSV implements all three features and all of them conform to level 1 (everything except infoset modification.)</para> <para>MSV supports a <ulink url="http://sourceforge.net/projects/relaxng" >vendor-independent Java interface</ulink> for RELAX NG datatype libraries. MSV can work with any datatype library that implements this interface. For more information, see RNGDatatypeLibrary.html.</para> </refsect2> <refsect2> <title>RELAX Core</title> <para>This implementation fully conforms to the current JIS TR specification.</para> </refsect2> <refsect2> <title>RELAX Namespace</title> <para><sgmltag>anyOtherAttribute</sgmltag> is not implemented.</para> </refsect2> <refsect2> <title>W3C XML Schema Part 1</title> <orderedlist> <listitem> <para><ulink url="http://www.w3.org/TR/xmlschema-1/#concepts-schemaConstraints" ><quote>Schema component constraints</quote> and <quote>Schema representation constraints</quote></ulink> are not fully enforced. In other words, MSV may accept schemas that are rejected by other conforming processors.</para> <para>Unimplemented checks include (but not limited to) <ulink url="http://www.w3.org/TR/xmlschema-1/#cos-nonambig"> <citetitle>UPA constraint</citetitle> </ulink> and <ulink url="http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict"> <citetitle>Particle Valid Restriction</citetitle> </ulink> </para> </listitem> <listitem> <para><ulink url="http://www.w3.org/TR/xmlschema-1/#conformance-missing" ><citetitle>Missing sub-components</citetitle></ulink> are treated as immediate errors. This behavior better serves the majority of users.</para> </listitem> <listitem> <para>Default values are ignored. In fact, no infoset contribution is supported: MSV validates documents, but it doesn't augment them. Post Schema-Validation Infoset (PSVI) is also not supported.</para> </listitem> </orderedlist> </refsect2> </refsect1> <refsect1 id="msv.furtherreading"> <title>Further Reading</title> <para>To learn RELAX, <ulink url="http://www.xml.gr.jp/relax/" ><citetitle>How to RELAX</citetitle></ulink> is a good starter. To learn TREX, there is the <ulink url="http://thaiopensource.com/trex/tutorial.html" ><citetitle>TREX tutorial</citetitle></ulink>. RELAX NG also has its own tutorial. For W3C XML Schema Part 2, see section 2.3 of <ulink url="http://www.w3.org/TR/2001/PR-xmlschema-0-20010316/#CreatDt" ><citetitle>XML Schema Part 0: Primer</citetitle></ulink>. </para> <para>This man page is built upon <ulink url="file:///usr/share/doc/packages/msv/commandline.html">Usage Guide for Sun Multi-Schema Validator</ulink>.</para> </refsect1> </refentry>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor