This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.xml
94 lines (79 loc) · 4.16 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
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="vmt" default="generate" basedir=".">
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="base_dir" value="${user.dir}"/>
<property name="archive.dir" value="${base_dir}/2012-06-14"/>
<property name="xml.dir" value="${archive.dir}/xmldata"/>
<property name="xsl.dir" value="${base_dir}/web/xsl"/>
<property name="header.dir" value="${archive.dir}/headers"/>
<property name="result.dir" value="${base_dir}/build"/>
<property name="html.dir" value="${base_dir}/build/html"/>
<property name="dcmiterms.dir" value="${base_dir}/build/html/dcmi-terms"/>
<property name="history.dir" value="${base_dir}/build/html/history"/>
<!--
you can specify xml:lang using 'language' property.
e.g. fr, de, ja, etc...
-->
<property name="language" value="en"/>
<property name="use-xml-lang" value="no"/>
<tstamp/>
<property name="xsltp" value="org.apache.xalan.xslt.Process"/>
<target name="generate" depends="dcam,dcelements,dctype,dcterms,htmldcmiterms,htmlhistory" description="generate DCMI Metadata Terms (schemas and HTML) and version history"/>
<!-- new targets -->
<target name="dcam" depends="prepare">
<xslt in="${xml.dir}/dcam.xml" out="${result.dir}/dcam.rdf" style="${xsl.dir}/dcam.xsl">
<param name="language" expression="${language}" />
<param name="xml-lang-for-date" expression="${use-xml-lang}" />
<param name="header" expression="${header.dir}/header-rdf-dcam.xml" />
</xslt>
</target>
<target name="dcelements" depends="prepare">
<xslt in="${xml.dir}/dcelements.xml" out="${result.dir}/dcelements.rdf" style="${xsl.dir}/dcelements.xsl">
<param name="language" expression="${language}" />
<param name="xml-lang-for-date" expression="${use-xml-lang}" />
<param name="header" expression="${header.dir}/header-rdf-dcelements.xml" />
</xslt>
</target>
<target name="dctype" depends="prepare">
<xslt in="${xml.dir}/dctype.xml" out="${result.dir}/dctype.rdf" style="${xsl.dir}/dctype.xsl">
<param name="language" expression="${language}" />
<param name="xml-lang-for-date" expression="${use-xml-lang}" />
<param name="header" expression="${header.dir}/header-rdf-dctype.xml" />
</xslt>
</target>
<target name="dcterms" depends="prepare">
<xslt in="${xml.dir}/dcterms-classes.xml" out="${result.dir}/dcterms.rdf" style="${xsl.dir}/dcterms.xsl">
<param name="language" expression="${language}" />
<param name="xml-lang-for-date" expression="${use-xml-lang}" />
<param name="header" expression="${header.dir}/header-rdf-dcterms.xml" />
<param name="properties" expression="${xml.dir}/dcterms-properties.xml" />
<param name="ses" expression="${xml.dir}/dcterms-ses.xml" />
<param name="ves" expression="${xml.dir}/dcterms-ves.xml" />
</xslt>
</target>
<!-- CHECKME: the version of xsltproc I am using to test this requires a doubledash-xinclude command line argument to support XInclude.
Just in case this is also required in the XSLT processor used to run this ant script (xalan), it will need to be passed in somewhere around here -->
<target name="htmldcmiterms" depends="prepare">
<xslt in="${header.dir}/header-doc-dcterms.xml" out="${dcmiterms.dir}/index.shtml" style="${xsl.dir}/html-dcmiterms.xsl">
<param name="todaysDate" expression="${DSTAMP}" />
<param name="datestamp.dir" expression="${archive.dir}" />
</xslt>
</target>
<!-- FIXME: refer comment above target "htmldcmiterms" above -->
<target name="htmlhistory" depends="prepare">
<xslt in="${header.dir}/header-doc-history.xml" out="${history.dir}/index.shtml" style="${xsl.dir}/html-history.xsl">
<param name="todaysDate" expression="${DSTAMP}" />
<param name="datestamp.dir" expression="${archive.dir}" />
</xslt>
</target>
<target name="prepare">
<mkdir dir="${result.dir}"/>
<mkdir dir="${html.dir}"/>
<mkdir dir="${dcmiterms.dir}"/>
<mkdir dir="${history.dir}"/>
</target>
<target name="clean" description="cleanup generated files">
<delete dir="${result.dir}"/>
</target>
</project>