Ant Support in oXygen Eclipse Plugin

Having trouble installing Oxygen? Got a bug to report? Post it all here.
cfjustice
Posts: 2
Joined: Thu Aug 04, 2005 7:06 pm
Location: Denver, CO USA

Ant Support in oXygen Eclipse Plugin

Post by cfjustice »

Is there any way to use an Ant Build script to call the Schematron tools built into oXygen?

Thanks,
Chris Justice
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

For anybody else with this problem

Post by Radu »

Hello Christopher

The schematron validation is based on applying stylesheets over the XML documents received as input.

Transformation steps:

1) Download files schematron-message.xsl <http://www.ascc.net/xml/schematron/1.5/ ... essage.xsl> and skeleton1-5.xsl <http://www.ascc.net/xml/schematron/1.5/skeleton1-5.xsl> from http://xml.ascc.net/schematron/1.5/mess ... ssage.html

2) Transform your schematron rules file (sch) against the schematron-message.xsl stylesheet, this results in another stylesheet file which you can save for example as "validator.xsl".

3) Transform any of your xml files against the "validator.xsl" stylesheet and on the output you will receive the validation errors or warnings.

For xslt transformation you can use the Ant "XSLT" task from http://ant.apache.org/manual/CoreTasks/style.html.

Example of ant task for creating the validator.xsl stylesheet:

<xslt in="doc.xml" out="output.txt"
style="style.xsl">
<outputproperty name="method" value="xml"/>
<outputproperty name="indent" value="yes"/>
</xslt>

Hope this helps,
Regards, Radu.
cfjustice
Posts: 2
Joined: Thu Aug 04, 2005 7:06 pm
Location: Denver, CO USA

Post by cfjustice »

Hi Radu,

That was very helpful. I did find a lot of compatibility issues with the XSLT transformers and Schematron. Xalan has issues with namespaces. Saxon version 8 gives a lot of errors regarding attributes. I could only get Saxon 6.5.4 to work with our schemas.

Thanks again!
Chris
Post Reply