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/skins/common/xslt/html document2html.xsl
Date Mon, 08 Sep 2003 12:02:54 GMT
jefft       2003/09/08 05:02:54

  Modified:    src/resources/skins/common/xslt/html document2html.xsl
  Log:
  Better <version> handling, including parsing of CVS $Revision$ tags to extract
  the version
  
  Revision  Changes    Path
  1.28      +30 -20    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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- document2html.xsl	6 Sep 2003 14:22:27 -0000	1.27
  +++ document2html.xsl	8 Sep 2003 12:02:54 -0000	1.28
  @@ -81,24 +81,18 @@
             <xsl:value-of select="header/subtitle"/>
           </h3>
         </xsl:if>
  -      <xsl:if test="header/authors">
  -        <p>
  -          <font size="-2">
  -            <xsl:for-each select="header/authors/person">
  -              <xsl:choose>
  -                <xsl:when test="position()=1">by&#160;</xsl:when>
  -                <xsl:otherwise>,&#160;</xsl:otherwise>
  -              </xsl:choose>
  -              <xsl:value-of select="@name"/>
  -            </xsl:for-each>
  -          </font>
  -        </p>
  -      </xsl:if>
         <xsl:apply-templates select="header/version"/>
         <xsl:apply-templates select="header/type"/>
         <xsl:apply-templates select="header/notice"/>
         <xsl:apply-templates select="header/abstract"/>
         <xsl:apply-templates select="body"/>
  +      <div class="attribution">
  +        <xsl:apply-templates select="header/authors"/>
  +        <xsl:if test="header/authors and header/version">
  +          <xsl:text>; </xsl:text>
  +        </xsl:if>
  +        <xsl:apply-templates select="header/version"/>
  +      </div>
       </div>
     </xsl:template>
   
  @@ -366,20 +360,36 @@
         </a>
       </xsl:if>
     </xsl:template>
  -  
  +
  +  <xsl:template match="header/authors">
  +    <xsl:for-each select="person">
  +      <xsl:choose>
  +        <xsl:when test="position()=1">by&#160;</xsl:when>
  +        <xsl:otherwise>,&#160;</xsl:otherwise>
  +      </xsl:choose>
  +      <xsl:value-of select="@name"/>
  +    </xsl:for-each>
  +  </xsl:template>
  +
     <xsl:template match="version">
  -    <p class="version">
  -    <!-- FIXME: i18n Transformer here -->
  -    <xsl:text>Version: </xsl:text>
  +    <span class="version">
         <xsl:apply-templates select="@major"/>
         <xsl:apply-templates select="@minor"/>
         <xsl:apply-templates select="@fix"/>
         <xsl:apply-templates select="@tag"/>
  -    </p>
  +      <xsl:choose>
  +        <xsl:when test="starts-with(., '$Revision: ')">
  +          version <xsl:value-of select="substring(., 12, string-length(.) -11-2)"/>
  +        </xsl:when>
  +        <xsl:otherwise>
  +          <xsl:value-of select="."/>
  +        </xsl:otherwise>
  +      </xsl:choose>
  +    </span>
     </xsl:template>
     
     <xsl:template match="@major">
  -     <xsl:value-of select="."/>
  +     v<xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="@minor">
  
  
  

Mime
View raw message