ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/make template-simple.ati template-simple.xsl
Date Sun, 17 Jun 2001 00:29:36 GMT
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>
  
  

Mime
View raw message