[dsdl-discuss] Ant task for DSDL

From: Rick Jelliffe <rjelliffe@allette.com.au>
Date: Thu May 29 2008 - 08:03:26 UTC

I am preparing various DSDL related projects for open source
availability. Does anyone have a better idea than SourceForge?

These include

 * XSD2SCH The XSD to Schematron converter I (and Rahul Grewel and
Cheney Xin and Setyadi Wibisono) have been making for JSTOR in XSLT2.
This uses lots of phases, and explodes a little in size, but it doesn't
just stop at the first error, which is turning out to be much more
critical for users who want a summary of conformance rather than just
pass/fail. (I recommend to RELAX NG implementers that they consider
putting in resynch points in their validators so that multiple errors
can be found: there must be unambiguous reset points in most grammars,
e.g. whenever there is a unique element name, though I understand that
this may be inside-out for forest automata.)

  This works in a couple of passes. The first set of passes construct an
enormous effective schema from all the modules. This makes life much
easier. The second does the conversion. The code misses out a few things
like equivalence groups, and I hope there may be contributors adding to
them. (It would need some of these extras added before being
comprehensive enough for a general purpose product, but it does cover a
lot of cases including XSD datatypes and type derivation.)

 * XSD2RNG This XSD to RELAX NG (incl compact syntax) is something I
did in 2006 for converting the ECMA OOXML schemas to RELAX NG in
XSLT. Those XSDs were quite nasty, and the RNG it created was dodgy.

Murata-san has kindly updated it for the final IS29500, which involved a
post processor to clean up silly structures and also a set of XSLT and
Ruby pre-processors to handle the namespace/import and include issues.
It is pretty good now, except that some hand editing is needed to cope
with <xs:any> wildcards.

(It would need this wildcarding fixed, or perhaps the Ruby code
replaced, before it was suitable for integration in an end-user product.)

 * Ant task for Schematron This is a Java class file which allows Ant
integration of Schematron validation, made by Christophe Lauret and
Willy Ekasalim. The latest version I am preparing now to handle XLST2 as
well as Schematron 1.6.

It is used like this:
 
  <target name="test-fileset" description="Test with a Fileset">
    <taskdef name="schematron"
classname="com.schematron.ant.SchematronTask"
classpath="../lib/ant-schematron.jar"/>
      <schematron schema="../schemas/test.sch" failonerror="true"
debugmode="false">
        <fileset dir="../xml" includes="*.xml"/>
      </schematron>
  </target>
 

MY PROPOSAL: An integrated DSDL library for Ant

And here is what I would like to suggest: I would like to bundle other
DSDL technologies with the Schematron task, so that there are RELAX NG,
DSRL, NVRL etc tasks available as well, providing it doesn't take too
much work. Or if there is someone out there who would consider taking
this over management of this, it would be doubly great!

At the moment, Ant is the thing for Java developers. We need tasks for
it if we want to become mainstream for that world. Once the library is
available, we would register it at the Ant website as an extension: this
is a nice service the Ant people provide.

Cheers
Rick Jelliffe

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Thu May 29 10:02:20 2008

This archive was generated by hypermail 2.1.8 : Thu May 29 2008 - 08:13:04 UTC