You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/06/17 02:29:36 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/make template-simple.ati template-simple.xsl
donaldp 01/06/16 17:29:36
Added: proposal/myrmidon/src/make template-simple.ati
template-simple.xsl
Log:
Added in very simple demonstration of XSL templating.
Revision Changes Path
1.1 jakarta-ant/proposal/myrmidon/src/make/template-simple.ati
Index: template-simple.ati
===================================================================
<?xml version="1.0"?>
<project default="main" basedir=".">
<target name="main">
<echo message="Before template"/>
<echo-template msg="Template echo 1!" />
<echo-template msg="Template echo 2!" />
<echo-template msg="Template echo 3!" />
<echo message="After template"/>
</target>
</project>
1.1 jakarta-ant/proposal/myrmidon/src/make/template-simple.xsl
Index: template-simple.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="echo-template">
<echo message="This is an example of how to use a template to expand" />
<echo message="a single element into a list of tasks to do. In this" />
<echo message="example it is largely a case of echoing an attribute" />
<echo message="ie. msg='{@msg}'" />
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>