aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/xslt.xml
blob: d872ea8c385a3991e6d259aa983ae106e3c9554e (plain)
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
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<project name="xslt" default="tearDown" basedir=".">

  <import file="../../buildfiletest-base.xml"/>

  <target name="setUp">
    <mkdir dir="${output}" />
  </target>

  <target name="initNonAscii" depends="setUp">
    <property name="nonasciidir" value="${output}/&#0227;nt"/>
    <mkdir dir="${nonasciidir}"/>
      <copy todir="${nonasciidir}">
        <fileset dir="xml">
          <include name="docwithentity.xml"/>
          <include name="entity.xml"/>
        </fileset>
      </copy>
  </target>

  <target name="testCatchNoDtd" depends="setUp">
    <xslt basedir="xml" destdir="${output}"
           includes="about.xml"
           extension=".txt"
           style="xml/doc.xsl">
     </xslt>
  </target>
  
  <xmlcatalog id="xdocs.catalog">
   <dtd publicID="-//stevo//DTD doc 1.0//EN"
     location="xml/doc.dtd"/>
  </xmlcatalog>  
  
  <target name="testCatalog" depends="setUp">
    <xslt destdir="${output}"
           includes="about.xml"
           extension=".txt"
           style="xml/doc.xsl">
       <xmlcatalog refid="xdocs.catalog"/>
     </xslt>
  </target>

  <target name="testOutputProperty" depends="setUp">
    <xslt in="xml/test.xml"
           out="${output}/test-out.xml"
           style="xml/test.xsl">
      <outputproperty name="method" value="xml"/>
      <outputproperty name="standalone" value="yes"/>
      <outputproperty name="encoding" value="iso8859_1"/>
      <outputproperty name="indent" value="yes"/>
    </xslt>
  </target>
  
  
  <target name="testFactory" depends="setUp">
    <xslt in="xml/test.xml"
           out="${output}/test-out.xml"
           style="xml/test.xsl">
           <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
    </xslt>
  </target>

  <target name="testAttribute" depends="setUp">
    <xslt in="xml/test.xml"
           out="${output}/test-out.xml"
           style="xml/test.xsl">
           <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
            <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/>
           </factory>
    </xslt>
  </target>
  <!-- inspired by bug report 37348 -->
  <target name="testXMLWithEntitiesInNonAsciiPath" depends="initNonAscii">
    <xslt in="${nonasciidir}/docwithentity.xml"
           out="${output}/test-out.xml"
           style="xml/apache.xsl">
    </xslt>
  </target>
  <target name="testStyleSheetWithInclude" depends="setUp">
    <xslt in="xml/books.xml"
           out="${output}/test-out.xml"
           style="xml/stylesheet_with_include.xsl">
    </xslt>
  </target>
</project>