1 <project name="nymph" default="castor" basedir=".">
2 <property name="castor.home" value="/usr/local/java/xml/castor-0.9.5.3"/>
3 <property name="schema.dir" value="schemas"/>
4 <property name="schema.xsd" value="goods.xsd"/>
5 <property name="docs.dir" value="docs"/>
6 <property name="package" value="com.netpotlet.nymph"/>
7 <property name="dest" value="./src"/>
8 <property name="trang.home" value="/usr/local/java/xml/trang-20030619"/>
9 <property name="schema.rng" value="goods.rng"/>
10 <property name="msv.home" value="/usr/local/java/xml/msv-20030225"/>
11 <property name="msv.jar" value="${msv.home}/msv.jar"/>
12 <property name="doc" value="goods.xml"/>
13
14 <path id="classpath">
15 <pathelement location="${castor.home}/castor-0.9.5.3-xml.jar"/>
16 </path>
17
18 <target name="castor" depends="trang">
19 <echo message="Generating Java classes and interfaces
..."/>
20 <java classname="org.exolab.castor.builder.SourceGenerator" fork="yes">
21 <classpath refid="classpath" />
22 <arg line="-f -i ${schema.dir}/${schema.xsd}
-package ${package} -dest ${dest}"/>
23 </java>
24 </target>
25
26 <target name="trang">
27 <echo message="Transforming the schema..."/>
28 <java jar="${trang.home}/trang.jar" fork="true">
29 <arg line="-I rng -O xsd ${schema.dir}/${schema.rng}
${schema.dir}/${schema.xsd}"/>
30 </java>
31 </target>
32
33 <target name="validate">
34 <java jar="${msv.jar}" fork="true">
35 <arg value="${schema.dir}/${schema.rng}"/>
36 <arg value="${docs.dir}/${doc}"/>
37 </java>
38 </target>
39 </project>