You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/01/27 07:42:49 UTC

cvs commit: xml-forrest/src/resources/skins/krysalis-site/xslt/html document2html.xsl

jefft       2003/01/26 22:42:49

  Modified:    .        status.xml
               src/resources/library/xslt faq2document.xsl
               src/resources/skins/common/xslt/html document2html.xsl
               src/resources/skins/krysalis-site/xslt/html
                        document2html.xsl
  Log:
  - Indent faqs
  - Add links back to the menu
  
  Revision  Changes    Path
  1.102     +1 -0      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- status.xml	27 Jan 2003 03:42:16 -0000	1.101
  +++ status.xml	27 Jan 2003 06:42:49 -0000	1.102
  @@ -40,6 +40,7 @@
             <li>Number FAQ entries and categories</li>
             <li>Added back-links from FAQ entries to the menu</li>
             <li>Process tags in &lt;question&gt; in menu entries</li>
  +          <li>Indent FAQ text</li>
             <li>FAQ sample added to seed project</li>
           </ul>
           Thanks to Joerg Pietschmann and Ralf Hauser for the suggestions.
  
  
  
  1.9       +0 -1      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- faq2document.xsl	27 Jan 2003 03:42:16 -0000	1.8
  +++ faq2document.xsl	27 Jan 2003 06:42:49 -0000	1.9
  @@ -86,7 +86,6 @@
           <xsl:number level="multiple" count="faq|part" format="1.1. "/>
           <xsl:apply-templates select="question"/>
         </title>
  -      <link href="#{$id}-menu">^</link>
         <xsl:apply-templates select="answer"/>
       </section>
     </xsl:template>
  
  
  
  1.8       +20 -2     xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- document2html.xsl	27 Jan 2003 03:57:16 -0000	1.7
  +++ document2html.xsl	27 Jan 2003 06:42:49 -0000	1.8
  @@ -127,8 +127,26 @@
       <!-- generate a title element, level 1 -> h3, level 2 -> h4 and so on... -->
       <xsl:element name="{concat('h',$sectiondepth + 2)}">
         <xsl:value-of select="title"/>
  +      <xsl:if test="$isfaq='true' and $sectiondepth = 3">
  +        <span style="float: right"><a href="#{@id}-menu">^</a></span>
  +      </xsl:if>
       </xsl:element>
  -    <xsl:apply-templates select="*[not(self::title)]"/>
  +
  +    <!-- Indent FAQ entry text 15 pixels -->
  +    <xsl:variable name="indent">
  +      <xsl:choose>
  +        <xsl:when test="$isfaq='true' and $sectiondepth = 3">
  +          <xsl:text>15</xsl:text>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:text>0</xsl:text>
  +        </xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +
  +    <div style="margin-left: {$indent} ; border: 2px">
  +          <xsl:apply-templates select="*[not(self::title)]"/>
  +    </div>
     </xsl:template>
   
     <xsl:template match="note | warning | fixme">
  
  
  
  1.2       +12 -4     xml-forrest/src/resources/skins/krysalis-site/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/xslt/html/document2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- document2html.xsl	7 Dec 2002 16:26:34 -0000	1.1
  +++ document2html.xsl	27 Jan 2003 06:42:49 -0000	1.2
  @@ -143,12 +143,20 @@
               </table>
                   <xsl:apply-templates select="*[not(self::title)]"/>
   	 	</xsl:when>
  +        <!-- If a faq, answer sections will be level 3 (1=Q/A, 2=part) -->
  +        <xsl:when test="$level=3 and $isfaq='true'">
  +          <h4><xsl:value-of select="title"/></h4>
  +          <div align="right"><a href="#{@id}-menu">^</a></div>
  +            <div style="margin-left: 15px">
  +              <xsl:apply-templates select="*[not(self::title)]"/>
  +            </div>
  +        </xsl:when>
   	 	<xsl:when test="$level=3">
  +          <h4><xsl:value-of select="title"/></h4>
  +          <xsl:apply-templates select="*[not(self::title)]"/>
   
  -	 	  <h4><xsl:value-of select="title"/></h4>
  -	 	      <xsl:apply-templates select="*[not(self::title)]"/>
  +        </xsl:when>
   
  -	 	</xsl:when>
   	 	<xsl:otherwise>
   	 	  <h5><xsl:value-of select="title"/></h5>
   	 	      <xsl:apply-templates select="*[not(self::title)]"/>