Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (79 sloc) 4.16 KB
<?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>
Jump to Line
Something went wrong with that request. Please try again.