forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/library/xslt faq2document.xsl
Date Mon, 27 Jan 2003 03:17:34 GMT
jefft       2003/01/26 19:17:34

  Modified:    src/resources/library/xslt faq2document.xsl
  Log:
  - Add back-linking from FAQ entries to the menu
  - Number FAQ entries
  
  Revision  Changes    Path
  1.7       +24 -13    xml-forrest/src/resources/library/xslt/faq2document.xsl
  
  Index: faq2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/faq2document.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- faq2document.xsl	27 Jan 2003 00:39:48 -0000	1.6
  +++ faq2document.xsl	27 Jan 2003 03:17:33 -0000	1.7
  @@ -28,10 +28,14 @@
   
     <xsl:template match="part" mode="index">
       <li>
  +	  <xsl:attribute name="id">
  +        <xsl:call-template name="generate-id"/><xsl:text>-menu</xsl:text>
  +	  </xsl:attribute>
         <link>
           <xsl:attribute name="href">
             <xsl:text>#</xsl:text><xsl:call-template name="generate-id"/>
           </xsl:attribute>
  +	  <xsl:number level="multiple" count="faq|part" format="1.1. "/>
          <xsl:apply-templates select="title"/>
         </link>
          <ul>
  @@ -42,6 +46,9 @@
   
     <xsl:template match="faq" mode="index">
       <li>
  +	  <xsl:attribute name="id">
  +        <xsl:call-template name="generate-id"/><xsl:text>-menu</xsl:text>
  +	  </xsl:attribute>
         <link>
           <xsl:attribute name="href">
             <xsl:text>#</xsl:text><xsl:call-template name="generate-id"/>
  @@ -52,25 +59,29 @@
     </xsl:template>
   
     <xsl:template match="part">
  -    <section>
  -      <xsl:attribute name="id">
  -        <xsl:call-template name="generate-id"/>
  -      </xsl:attribute>
  +    <xsl:variable name="id">
  +      <xsl:call-template name="generate-id"/>
  +    </xsl:variable>
  +    <section id="{$id}">
         <title>
  -      <xsl:value-of select="title"/>
  -     </title>
  +        <xsl:number level="multiple" count="faq|part" format="1.1. "/>
  +        <xsl:value-of select="title"/>
  +      </title>
         <xsl:apply-templates select="faq|part"/>
       </section>
     </xsl:template>
   
     <xsl:template match="faq">
  -    <section>
  -      <xsl:attribute name="id">
  -        <xsl:call-template name="generate-id"/>
  -      </xsl:attribute>
  -     <title>
  -      <xsl:value-of select="question"/>
  -     </title>
  +    <xsl:variable name="id">
  +      <xsl:call-template name="generate-id"/>
  +    </xsl:variable>
  +
  +    <section id="{$id}">
  +      <title>
  +        <xsl:number level="multiple" count="faq|part" format="1.1. "/>
  +        <xsl:value-of select="question"/>
  +      </title>
  +      <link href="#{$id}-menu">^</link>
         <xsl:apply-templates/>
       </section>
     </xsl:template>
  
  
  

Mime
View raw message