Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / html / 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 9875 2011-12-04 18:27:43Z 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}/html/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
  <target name="transform">
47
    <echo level="info">XSLT generate HTML files</echo>
48
    <xslt force="yes" style="${stylesheetFile}" in="${outputTempDir}/tmp2.xml" out="${outputFile}" classpath="classpath">
49
      <xmlcatalog>
50
        <catalogpath>
51
          <pathelement location="../../../../catalog.xml"/>
52
          <pathelement location="../../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
53
        </catalogpath>
54
      </xmlcatalog>
55
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
56
      <classpath location="${oxygenlib}/saxon9ee.jar"/>
57
      <param name="directory" expression="file:///${outputTempDir}"/>
58
      <param name="inputDir" expression="${inputFileDir}/"/>
59
      <param name="cssFile" expression="${cssFile}" if="cssFile"/>
60
      <!-- name of media overlay file -->
61
      <param name="mediaoverlay" expression="${mediaoverlay}" if="mediaoverlay"/>
62
      <!-- file per page -->
63
      <param name="filePerPage" expression="${filePerPage}" if="filePerPage"/>
64
      <!-- supply name of language-->
65
      <param name="lang" expression="${lang}" if="lang"/>
66
      <!-- emit some diagnostics"-->
67
      <param name="debug" expression="${debug}" if="debug"/>
68
      <!-- be verbose-->
69
      <param name="verbose" expression="${verbose}" if="verbose"/>
70
    </xslt>
71
  </target>
72

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

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

    
79
</project>