donaldp     2002/06/16 05:15:16

  Added:       tools    cocoon2anakia.xsl
  Log:
  Add in basic stylesheet that converts documents in the default cocoon format 
to the default anakia format.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon/tools/cocoon2anakia.xsl
  
  Index: cocoon2anakia.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  
      <xsl:output method="xml" indent="no"/>
  
      <!-- strip footer -->
      <xsl:template match="footer"/>
  
      <!-- header to properties -->
      <xsl:template match="header">
          <properties>
              <xsl:apply-templates/>
          </properties>
      </xsl:template>
  
      <!-- strip authors section -->
      <xsl:template match="warn"/>
  
      <!-- strip authors section -->
      <xsl:template match="authors">
          <xsl:apply-templates/>
      </xsl:template>
  
      <!-- person to author -->
      <xsl:template match="person">
          <author email="[EMAIL PROTECTED]">
              <xsl:value-of select="@name"/>
          </author>
      </xsl:template>
  
      <!-- update s1 section -->
      <xsl:template match="s1">
          <section name="[EMAIL PROTECTED]">
              <xsl:apply-templates/>
          </section>
      </xsl:template>
  
      <!-- update s1 section -->
      <xsl:template match="s2">
          <subsection name="[EMAIL PROTECTED]">
              <xsl:apply-templates/>
          </subsection>
      </xsl:template>
  
      <xsl:template match="node()|@*" priority="-1">
          <xsl:copy>
              <xsl:apply-templates select="node()|@*"/>
          </xsl:copy>
      </xsl:template>
  
  </xsl:stylesheet>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to