-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
85 lines (68 loc) · 3.81 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
6 May 2014 15:16:34
ant script to do initial translation of vodml files to vodsl
it is necessary to have the volute data models project checked out locally
and to point the vodmlbase property at that location.
Paul Harrison
====================================================================== -->
<project name="project" default="alltodsl">
<property name="vodmlbase" location="/Users/pharriso/Work/volute/projects/dm/"/>
<property name="xsdbase" location="/Users/pharriso/Work/javastro/ivoa-schema/src/schema/"/>
<target name="alltodsl" description="description">
<todsl model="IVOA" sdir="vo-dml/models/ivoa"/>
<todsl model="Characterization" sdir="vo-dml/models/characterization"/>
<todsl model="SourceDM" sdir="vo-dml/models/source-std" />
<todsl model="PhotDM-alt" sdir="vo-dml/models/photdm-alt" />
<todsl model="ObsCore" sdir="vo-dml/models/obscore"/>
<todsl model="SpectrumDM" sdir="vo-dml/models/spectrum" />
<todsl model="RegTAP" sdir="vo-dml/models/registry"/>
<todsl model="coordsys_tessel" sdir="vo-dml/models/tesselation" />
<todsl model="coords_tessel" sdir="vo-dml/models/tesselation" />
<todsl model="lmsource" sdir="vo-dml/models/tesselation" />
<todsl model="Sample" sdir="vo-dml/models/sample/sample/vo-dml/"/>
<todsl model="Filter" sdir="vo-dml/models/sample/filter/vo-dml/"/>
<todsl model="DatasetMetadata-1.0" sdir="DatasetMetadata/vo-dml/"/>
<todsl model="STC_coords-v1.0" sdir="STC/Coords/vo-dml/"/>
<todsl model="STC_meas-v1.0" sdir="STC/Meas/vo-dml/"/>
<todsl model="STC_trans-v1.0" sdir="STC/Trans/vo-dml/"/><!-- has moved to github -->
<todsl model="Cube-1.0" sdir="Cube/vo-dml/" />
<todsl model="Provenance" sdir="provenance/ProvDM/vo-dml/"/>
</target>
<!-- =================================
target: fewdsl
================================= -->
<target name="fewdsl" description="do a few transformations">
<get src="https://raw.githubusercontent.com/opencadc/caom2/master/caom2-dm/src/main/resources/CAOM-2.4-vodml.xml"
dest="/tmp/file.vo-dml.xml" />
<xslt style="vo-dml2dsl.xsl" in="/tmp/file.vo-dml.xml" out="CAOM.vodsl" force="true" >
<factory name="net.sf.saxon.TransformerFactoryImpl" />
</xslt>
</target>
<target name="single" description="single transformation">
<!-- <get src="https://www.opencadc.org/caom2/xml/CAOM-2.3-vodml.xml" dest="CAOM.vodml.xml"/> -->
<xslt style="vo-dml2dsl.xsl" in="mango.vo-dml.xml" out="mango.vodsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl" />
</xslt>
<!-- <delete file="CAOM.vodml.xml"></delete> -->
</target>
<macrodef name="todsl">
<attribute name="model" />
<attribute name="sdir" />
<sequential>
<xslt style="vo-dml2dsl.xsl" in="${vodmlbase}/@{sdir}/@{model}.vo-dml.xml" out="@{model}.vodsl" force="true" >
<factory name="net.sf.saxon.TransformerFactoryImpl" />
<!-- <param name="docversion" expression="${docversion}"/> -->
</xslt>
</sequential>
</macrodef>
<macrodef name="fromxsd">
<attribute name="model" />
<sequential>
<xslt style="xsd2dsl.xsl" in="${xsdbase}/@{model}.xsd" out="@{model}.vodsl" force="true" >
<factory name="net.sf.saxon.TransformerFactoryImpl" />
<!-- <param name="docversion" expression="${docversion}"/> -->
</xslt>
</sequential>
</macrodef>
</project>