crossley    01/12/30 05:26:33

  Modified:    documentation/stylesheets doclist2document.xsl
  Added:       documentation/stylesheets doclist.xsl
  Log:
  Modified stylesheets for generating the "List of Docs".
  
  Revision  Changes    Path
  1.2       +32 -29    xml-cocoon2/documentation/stylesheets/doclist2document.xsl
  
  Index: doclist2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/documentation/stylesheets/doclist2document.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- doclist2document.xsl      21 Nov 2001 13:56:02 -0000      1.1
  +++ doclist2document.xsl      30 Dec 2001 13:26:33 -0000      1.2
  @@ -4,30 +4,23 @@
       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>
  +    <s1 title="Table of Contents">
  +     <p>
  +      This complete list shows, at a glance, how all of the documentation
  +      fits together within a hierarchy of sections.
  +     </p>
  +     <p>
  +      The side-panel of each actual document is used to reach other documents
  +      that are relevant to that section. The side-panel will change, according
  +      to that section's location in the documentation hierarchy.
  +     </p>
  +    </s1>
       <xsl:apply-templates/>
      </body>
     </document>
  @@ -35,35 +28,45 @@
   
    <xsl:template match="book">
     <s1 title="{@title}">
  +   <xsl:if test="position()=1">
  +    <p>This first section is a list of the top-level documentation
  +     (and is a replica of this page's side-panel).</p>
  +   </xsl:if>
      <xsl:apply-templates/>
     </s1>
    </xsl:template>
   
  - <xsl:template match="menu[position()=1]">
  -   <xsl:apply-templates/>
  - </xsl:template>
  + <xsl:template match="path"/>
   
    <xsl:template match="menu">
  +  <xsl:if test="@label!='Navigation'">
     <p><strong><xsl:value-of select="@label"/></strong></p>
      <ul>
  -    <xsl:apply-templates/>
  +    <xsl:apply-templates>
  +     <xsl:with-param name="path" select="../path"/>
  +    </xsl:apply-templates>
      </ul>
  +  </xsl:if>
    </xsl:template>
   
  - <xsl:template match="menu-item | external">
  + <xsl:template match="menu-item">
  +  <xsl:param name="path"/>
     <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>
  +<!-- FIXME: ensure href is not full URL scheme:// -->
  +    <li><link href="{$path}{@href}"><xsl:value-of select="@label"/></link>
   <!--
  -    <li><link href="{@href}"><xsl:value-of select="@label"/></link></li>
  +  (path=<xsl:value-of select="$path"/> href=<xsl:value-of select="@href"/>)
   -->
  +    </li>
      </xsl:if>
     </xsl:if>
    </xsl:template>
   
  - <xsl:template match="node()|@*" priority="-1"/>
  + <xsl:template match="external">
  +  <xsl:if test="not(@type) or @type!='hidden'">
  +   <li><link href="{@href}"><xsl:value-of select="@label"/></link></li>
  +  </xsl:if>
  + </xsl:template>
   
   </xsl:stylesheet>
  
  
  
  1.1                  xml-cocoon2/documentation/stylesheets/doclist.xsl
  
  Index: doclist.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:param name="path"/>
  
   <xsl:template match="book">
    <book title="{@title}">
     <path><xsl:value-of select="$path"/></path>
     <xsl:apply-templates/>
    </book>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to