Statistics
| Revision:

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

History | View | Annotate | Download (3 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<project basedir="." default="dist" name="teitotext">
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 9319 2011-09-14 15:25:52Z 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 outputfile 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="odd2text"   value="../profiles/${profile}/txt/to.xsl"/>
34
  <property name="odd2oddxsl" value="../odds2/odd2odd.xsl"/>
35
  <dirname property="inputFileDir" file="${inputFile}"/>
36
  <dirname property="outputDir" file="${outputFile}"/>
37
  <property name="outputTempDir" value="${outputDir}/temp-dir-for-ant"/>
38
  <path id="classpath">
39
    <pathelement path="${java.class.path}"/>
40
  </path>
41
  <target name="setup">
42
    <delete dir="${outputTempDir}"/>
43
    <mkdir dir="${outputTempDir}"/>
44
  </target>
45

    
46
  <target name="dist" depends="setup,convert,cleanup"/>
47

    
48
  <target name="convert">
49
    <!-- Recreate temporary output directory -->
50
    <!-- The transformation for HTML output. -->
51
    <echo level="info">XSLT generate text file</echo>
52
    <xslt force="yes" style="${odd2text}" in="${inputFile}" out="${outputFile}" classpath="classpath">
53
      <xmlcatalog>
54
        <catalogpath>
55
          <pathelement location="../../../../catalog.xml"/>
56
          <pathelement location="../../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
57
        </catalogpath>
58
      </xmlcatalog>
59
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
60
      <classpath location="${oxygenlib}/saxon9ee.jar"/>
61
      <param name="directory" expression="file:///${outputTempDir}"/>
62
      <!-- supply name of language-->
63
      <param name="lang" expression="${lang}" if="lang"/>
64
      <!-- emit some diagnostics"-->
65
      <param name="debug" expression="${debug}" if="debug"/>
66
      <!-- be verbose-->
67
      <param name="verbose" expression="${verbose}" if="verbose"/>
68
    </xslt>
69
  </target>
70

    
71
  <target name="cleanup" unless="debug">  
72
    <delete dir="${outputTempDir}"/>
73
  </target>
74

    
75
</project>