XSV (XML Schema Validator) is an open source (GPLed) work-in-progress attempt at a conformant schema-aware processor, as defined by XML Schema Part 1: Structures, Second Edition of 28 October 2004. It has been developed at the Language Technology Group of the Human Communication Research Centre in the School of Informatics at the University of Edinburgh, with support for one of us (Thompson) from the World Wide Web Consortium.
The online service at the W3C has been retired. I recommend using the Xerces XML Schema 1.1 validator now.
I've packaged the current version up in to a self-installing package for Win32 platforms: just fetch it, run it, and add the installation directory to your PATH, then
> xsv [flags] target [schemas . ..]
file:///C:/Project/xxx.xml
).errfile
rather than stderr
.stylefile
in the error output.stdout
(follow with alt
to force old-style (alternating normal form) reflection, or ind
(the default) for new-style (individual normal form) reflection. Use -r -r
to get all schema components other than those of the schema for schemas, and -r -r -r
to get the complete PSVI reflection including the schema for schemas.elt
, an expanded name (i.e. either an unqualfied simple name in no known namespace, or a name of the form {namespaceName}localName
).type
, an expanded name as for -E.You can download the (Python) sources from the W3C public CVS repository, install Python 2.4 and do:
> [set PYTHONPATH to whereever you installed XSV sources] > python .../XSV/commandLine.py ...
No, the above instructions aren't sufficiently detailed, but you probably don't want the sources unless you can figure out how to make it work :-)
Previous versions of XSV required our fast Python/C hybrid XML parser---this version should work with either PyLTXML or PyXML:
Packages are now available for those running some versions of Linux:
These have a dependency on PyLTXML-1.3 (and Python itself -- they were all built with Python2.4), see above.
A simple tar ball is also available, suitable for installation using Python's distutils:
> [cd to whereever you unpacked the tarball] > python setup.py install
The basic framework of schema checking and instance schema-validation is implemented. Some details of both are not yet filled in.
I've implemented a new bounded-cost approach to translating content models with numeric exponents. In a change from the earlier (2.10) release, this even handles obscure corner cases involving numeric ranges nested inside numeric ranges correctly.
Here's a brief tabulation of implemented and unimplemented aspects of the REC:
http://www.w3.org/2001/XMLSchema
namespace<element ref="...">
now implementedDOCTYPE
of their own. This may mean errors are found where none were before, or a change in error message. Feedback on this change is welcome.<group>
, missing base<any>
-derived ambiguities{}
) will break the underlying Python substrate.