blob: 5e6bf0cbf2997ad504b406663d850da9eeb55821 [file] [log] [blame]
<?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="xslt" basedir=".">
<property name="nonasciidir" value="xml/&#0227;nt"/>
<target name="init">
<mkdir dir="xml/out"/>
</target>
<target name="initNonAscii">
<mkdir dir="${nonasciidir}"/>
<copy todir="${nonasciidir}">
<fileset dir="xml">
<include name="docwithentity.xml"/>
<include name="entity.xml"/>
</fileset>
</copy>
</target>
<target name="teardown">
<delete dir="xml/out"/>
<delete dir="${nonasciidir}" quiet="true"/>
</target>
<target name="testCatchNoDtd" depends="init">
<xslt basedir="xml" destdir="xml/out"
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="init">
<xslt destdir="xml/out"
includes="about.xml"
extension=".txt"
style="xml/doc.xsl">
<xmlcatalog refid="xdocs.catalog"/>
</xslt>
</target>
<target name="testOutputProperty" depends="init">
<xslt in="xml/test.xml"
out="xml/out/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="init">
<xslt in="xml/test.xml"
out="xml/out/test-out.xml"
style="xml/test.xsl">
<factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
</target>
<target name="testAttribute" depends="init">
<xslt in="xml/test.xml"
out="xml/out/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="xml/out/test-out.xml"
style="xml/apache.xsl">
</xslt>
</target>
<target name="testStyleSheetWithInclude" depends="init">
<xslt in="xml/books.xml"
out="xml/out/test-out.xml"
style="xml/stylesheet_with_include.xsl">
</xslt>
</target>
</project>