Page 1 of 1
Ant Support in oXygen Eclipse Plugin
Posted: Thu Aug 04, 2005 7:12 pm
by cfjustice
Is there any way to use an Ant Build script to call the Schematron tools built into oXygen?
Thanks,
Chris Justice
For anybody else with this problem
Posted: Fri Aug 05, 2005 4:43 pm
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.
Posted: Sat Aug 06, 2005 12:28 am
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