You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by cm...@apache.org on 2003/04/27 20:57:25 UTC

cvs commit: jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets sitemap2document.xsl

cmlenz      2003/04/27 11:57:25

  Added:       documentation/docs/skins/jakarta.apache.org/stylesheets
                        sitemap2document.xsl
  Log:
  Add stylesheet for sitemap -> document transformation
  (not used yet in the build)
  
  Revision  Changes    Path
  1.1                  jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/sitemap2document.xsl
  
  Index: sitemap2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- ====================================================================== -->
  <!-- Transform the Sitemap to a Document, so that it later can easily be -->
  <!-- transformed into HTML -->
  <!-- $Id: sitemap2document.xsl,v 1.1 2003/04/27 18:57:25 cmlenz Exp $ -->
  <!-- ====================================================================== -->
  
  <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <!-- Import common templates and parameters -->
    <xsl:import href="common.xsl"/>
  
    <xsl:output method="xml"/>
  
    <!-- ==================================================================== -->
    <!-- Templates -->
    <!-- ==================================================================== -->
  
    <xsl:template match="sitemap">
      <document id="sitemap">
        <properties>
          <title>Sitemap</title>
        </properties>
        <body>
          <section title="Sitemap">
            <xsl:apply-templates/>
          </section>
        </body>
      </document>
    </xsl:template>
  
    <xsl:template match="resource">
      <li class="sitemap">
        <a>
          <xsl:attribute name="href">
            <xsl:value-of select="@target"/>
          </xsl:attribute>
          <xsl:choose>
            <xsl:when test="@name">
              <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="@id"/>
            </xsl:otherwise>
          </xsl:choose>
        </a>
        <xsl:if test="text()">
          <p>
            <xsl:apply-templates/>
          </p>
        </xsl:if>
      </li>
    </xsl:template>
  
    <xsl:template match="external">
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org