Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / html5 / build-to.xml @ 187

History | View | Annotate | Download (3.3 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<project basedir="." default="dist" name="teitohtml">
3
<!--
4
        This library is free software; you can redistribute it and/or
5
        modify it under the terms of the GNU Lesser General Public
6
        License as published by the Free Software Foundation; either
7
        version 2.1 of the License, or (at your option) any later version.
8
        
9
        This library is distributed in the hope that it will be useful,
10
        but WITHOUT ANY WARRANTY; without even the implied warranty of
11
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
        Lesser General Public License for more details.
13
        
14
        You should have received a copy of the GNU Lesser General Public
15
        License along with this library; if not, write to the Free Software
16
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
        
18
        Id: $Id: build-to.xml 9703 2011-11-09 11:16:42Z rahtz $
19
        Copyright: 2011, TEI Consortium<
20
-->
21
  <!--
22
 Convert TEI documents into HTML files.
23
 -->
24
  <!-- Path to TEI XML file. -->
25
  <property name="inputFile" value=""/>
26
  <!-- Path where the output ePUB file will be saved. -->
27
  <property name="outputFile" value=""/>
28
  <!-- which profile -->
29
  <property name="profile" value="default"/>
30
  <!-- where does oxygen keep stuff -->
31
  <property name="oxygenlib" value=""/>
32
  <!-- Stylesheet for transformation -->
33
  <property name="stylesheetFile"  value="../profiles/${profile}/html5/to.xsl"/>
34
  <dirname property="inputFileDir" file="${inputFile}"/>
35
  <dirname property="outputDir" file="${outputFile}"/>
36
  <property name="outputTempDir" value="${outputDir}/temp-dir-for-ant"/>
37
  <path id="classpath">
38
    <pathelement path="${java.class.path}"/>
39
  </path>
40
  <import file="../odds2/build-to.xml"/>
41
  <target name="setup">
42
    <delete dir="${outputTempDir}"/>
43
    <mkdir dir="${outputTempDir}"/>
44
  </target>
45

    
46
 
47
  <target name="transform">
48
    <echo level="info">XSLT generate HTML5 files</echo>
49
    <xslt force="yes" style="${stylesheetFile}" in="${outputTempDir}/tmp2.xml" out="${outputFile}" classpath="classpath">
50
      <xmlcatalog>
51
        <catalogpath>
52
          <pathelement location="../../../../catalog.xml"/>
53
          <pathelement location="../../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
54
        </catalogpath>
55
      </xmlcatalog>
56
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
57
      <classpath location="${oxygenlib}/saxon9ee.jar"/>
58
      <param name="directory" expression="file:///${outputTempDir}"/>
59
      <param name="inputDir" expression="${inputFileDir}/"/>
60
      <param name="cssFile" expression="${cssFile}" if="cssFile"/>
61
      <!-- name of media overlay file -->
62
      <param name="mediaoverlay" expression="${mediaoverlay}" if="mediaoverlay"/>
63
      <!-- file per page -->
64
      <param name="filePerPage" expression="${filePerPage}" if="filePerPage"/>
65
      <!-- supply name of language-->
66
      <param name="lang" expression="${lang}" if="lang"/>
67
      <!-- emit some diagnostics"-->
68
      <param name="debug" expression="${debug}" if="debug"/>
69
      <!-- be verbose-->
70
      <param name="verbose" expression="${verbose}" if="verbose"/>
71
    </xslt>
72
  </target>
73

    
74
 <target name="dist" depends="setup,odd,notodd,transform,cleanup"/>
75

    
76
  <target name="cleanup" unless="debug">  
77
    <delete dir="${outputTempDir}"/>
78
  </target>
79

    
80
</project>