cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-cocoon2/documentation/stylesheets doclist2document.xsl
Date Wed, 21 Nov 2001 13:56:02 GMT
crossley    01/11/21 05:56:02

  Added:       documentation/stylesheets doclist2document.xsl
  Log:
  New stylesheet for "List of docs".
  
  Revision  Changes    Path
  1.1                  xml-cocoon2/documentation/stylesheets/doclist2document.xsl
  
  Index: doclist2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">
  
   <xsl:import href="copyover.xsl"/>
  
   <xsl:template match="doclist">
    <document>
     <header>
      <title>List of all documentation</title>
     </header>
     <body>
      <p>
       This complete list shows, at-a-glance, how all of the documentation
       fits together. The side-panel of each page is used to reach relevant
       documents, according to its location in the hierarchical documentation.
      </p>
  <anchor id="issues"/>
      <note>FIXME: many of the links are busted, because the first transformation
       does not have available the path info (e.g. userdocs/concepts/). We only
       have a relative URI available (e.g. catalog.html). One way to fix that
       would be to add a &quot;uri&quot; attribute to the &lt;book&gt; element
       in each book.xml (sounds hack). Another possibility: can a variable be
       passed via each map:part ?
      </note>
      <note>The documentation/sitemap.xmap defines the aggregation and
       transformations for match=doclist
      </note>
      <xsl:apply-templates/>
     </body>
    </document>
   </xsl:template>
  
   <xsl:template match="book">
    <s1 title="{@title}">
     <xsl:apply-templates/>
    </s1>
   </xsl:template>
  
   <xsl:template match="menu[position()=1]">
     <xsl:apply-templates/>
   </xsl:template>
  
   <xsl:template match="menu">
    <p><strong><xsl:value-of select="@label"/></strong></p>
     <ul>
      <xsl:apply-templates/>
     </ul>
   </xsl:template>
  
   <xsl:template match="menu-item | external">
    <xsl:if test="not(@type) or @type!='hidden'">
     <xsl:if test="@label!='Main' and @label!='User Documentation'">
      <li><xsl:value-of select="@label"/>
       (<link href="#issues">link coming soon</link> for
        <code>href=<xsl:value-of select="@href"/></code>)
      </li>
  <!--
      <li><link href="{@href}"><xsl:value-of select="@label"/></link></li>
  -->
     </xsl:if>
    </xsl:if>
   </xsl:template>
  
   <xsl:template match="node()|@*" priority="-1"/>
  
  </xsl:stylesheet>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message