git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272422 13f79535-47bb-0310-9956-ffa450edef68master
@@ -0,0 +1,10 @@ | |||||
<?xml version="1.0" encoding="UTF-8" ?> | |||||
<!DOCTYPE doc PUBLIC | |||||
"-//stevo//DTD doc 1.0//EN" | |||||
"nap:chemical+brothers" | |||||
> | |||||
<doc> | |||||
<section title="About"> | |||||
in the absence of technology, there is only marketing | |||||
</section> | |||||
</doc> |
@@ -0,0 +1,8 @@ | |||||
<!ELEMENT doc (section) > | |||||
<!ELEMENT section (#PCDATA)> | |||||
<!ATTLIST section title CDATA #IMPLIED> | |||||
@@ -0,0 +1,9 @@ | |||||
<xsl:stylesheet | |||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |||||
xmlns:template="struts template" | |||||
version="1.0"> | |||||
<xsl:output method="text"/> | |||||
<xsl:template match="/"> | |||||
<xsl:value-of select="/doc/section"/> | |||||
</xsl:template> | |||||
</xsl:stylesheet> |
@@ -0,0 +1,12 @@ | |||||
<?xml version="1.0" encoding="UTF-8" ?> | |||||
<project name="validate" default="testValidate" basedir="."> | |||||
<target name="testValidate"> | |||||
<xmlvalidate warn="false"> | |||||
<fileset dir="." includes="about.xml"/> | |||||
<dtd publicID="-//stevo//DTD doc 1.0//EN" | |||||
location="doc.dtd"/> | |||||
</xmlvalidate> | |||||
</target> | |||||
</project> |
@@ -0,0 +1,18 @@ | |||||
<?xml version="1.0" encoding="UTF-8" ?> | |||||
<project name="validate" default="testValidate" basedir="."> | |||||
<target name="testValidate"> | |||||
<xmlvalidate warn="false"> | |||||
<fileset dir="xml" includes="**/about.xml"/> | |||||
<dtd publicID="-//stevo//DTD doc 1.0//EN" | |||||
location="xml/doc.dtd"/> | |||||
</xmlvalidate> | |||||
</target> | |||||
<target name="testDeepValidate"> | |||||
<ant dir="xml" | |||||
antfile="validate.xml" | |||||
target="testValidate"/> | |||||
</target> | |||||
</project> |
@@ -0,0 +1,35 @@ | |||||
<?xml version="1.0" encoding="UTF-8" ?> | |||||
<project name="xslt" default="xslt" basedir="."> | |||||
<target name="init"> | |||||
<mkdir dir="xml/out"/> | |||||
</target> | |||||
<target name="teardown"> | |||||
<delete dir="xml/out"/> | |||||
</target> | |||||
<target name="testCatchNoDtd" depends="init"> | |||||
<style basedir="xml" destdir="xml/out" | |||||
includes="about.xml" | |||||
extension=".txt" | |||||
style="xml/doc.xsl"> | |||||
</style> | |||||
</target> | |||||
<xmlcatalog id="xdocs.catalog"> | |||||
<dtd publicID="-//stevo//DTD doc 1.0//EN" | |||||
location="xml/doc.dtd"/> | |||||
</xmlcatalog> | |||||
<target name="testCatalog" depends="init"> | |||||
<style destdir="xml/out" | |||||
includes="about.xml" | |||||
extension=".txt" | |||||
style="xml/doc.xsl"> | |||||
<xmlcatalog refid="xdocs.catalog"/> | |||||
</style> | |||||
</target> | |||||
</project> |