Changeset 5422 for trunk/gli/help


Ignore:
Timestamp:
2003-09-02T16:48:25+12:00 (21 years ago)
Author:
mdewsnip
Message:

Much much closer to the desired result.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/help/gen-many-html.xsl

    r5420 r5422  
    44  <xsl:output method="html"/>
    55
    6   <xsl:template match="Anchor"/>
     6
     7  <xsl:template match="Anchor">
     8    <p/>
     9    <img height="20" src="gatherer_small.gif" width="20"/>
     10    <a name="{@name}"><xsl:text> </xsl:text><xsl:apply-templates/></a>
     11    <p style="text-align:justify"/>
     12  </xsl:template>
     13
    714
    815  <xsl:template match="Break">
     
    1017  </xsl:template>
    1118
     19
    1220  <xsl:template match="Contents">
     21    <p/>
     22    <table align="center" border="2" cellpadding="2" width="480" bgcolor="#B0D0B0">
     23      <tr>
     24        <td align="center">
     25          <font face="Verdana" size="4">
     26            <strong>
     27              Contents
     28            </strong>
     29          </font>
     30        </td>
     31      </tr>
     32
     33      <tr>
     34        <td>
     35          <table bgcolor="#FFFFFF" border="0" cellpadding="2" width="100%">
     36            <xsl:apply-templates/>
     37          </table>
     38        </td>
     39      </tr>
     40    </table>
    1341    <p/>
    1442  </xsl:template>
    1543
     44
     45  <xsl:template match="ContentsGroup">
     46    <tr>
     47      <td colspan="3">
     48        <a href="#{@linkto}">Instructions</a>
     49      </td>
     50    </tr>
     51
     52    <xsl:apply-templates/>
     53  </xsl:template>
     54
     55
     56  <xsl:template match="ContentsItem">
     57    <xsl:variable name="depth" select="count(ancestor::ContentsItem) + 1"/>
     58    <tr>
     59      <td colspan="{$depth}">
     60        <xsl:text> </xsl:text>
     61      </td>
     62      <td colspan="{3 - $depth}">
     63        <xsl:apply-templates/>
     64      </td>
     65    </tr>
     66  </xsl:template>
     67
     68
    1669  <xsl:template match="Document">
    17     <html>
    18       <head>
    19         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
    20         <title>The Greenstone Librarian Interface - Help Pages</title>
    21       </head>
    22       <body bgcolor="#E0F0E0"> <!-- link="#000000" vlink="#000000"> -->
    23     <xsl:for-each select="Section">
    24       <xsl:call-template name="processSection">
    25         <xsl:with-param name="sectionHead" select="position()"/>
    26       </xsl:call-template>
    27     </xsl:for-each>
    28       </body>
    29     </html>
     70    <xsl:for-each select="Section">
     71      <xsl:call-template name="processSection">
     72    <xsl:with-param name="sectionHead" select="position()"/>
     73      </xsl:call-template>
     74    </xsl:for-each>
    3075  </xsl:template>
     76
    3177
    3278  <xsl:template match="Reference">
     
    3480  </xsl:template>
    3581
     82
    3683  <xsl:template match="Section"/>
     84
    3785
    3886  <xsl:template match="Title"/>
     
    4290    <xsl:param name="sectionHead"/>
    4391
    44     <xsl:if test="Title">
    45       <a name="{@name}">
    46         <xsl:call-template name="processTitle">
    47           <xsl:with-param name="sectionNumber" select="$sectionHead"/>
    48       <xsl:with-param name="sectionTitle" select="Title"/>
    49         </xsl:call-template>
    50       </a>
    51     </xsl:if>
     92    <html>
     93      <head>
     94        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
     95        <title>The Greenstone Librarian Interface - Help Pages</title>
     96      </head>
     97      <body bgcolor="#E0F0E0">
     98        <table border="2" bgcolor="#B0D0B0" cellpadding="5" cellspacing="0" width="100%">
     99          <tr>
     100            <td align="center" width="15%">
     101              <img height="45" src="gatherer_medium.gif" width="45"/>
     102            </td>
     103            <td align="center" width="*">
     104              <a name="{@name}">
     105                <xsl:call-template name="processTitle">
     106                  <xsl:with-param name="sectionNumber" select="$sectionHead"/>
     107              <xsl:with-param name="sectionTitle" select="Title"/>
     108                </xsl:call-template>
     109              </a>     
     110            </td>
     111            <td align="center" width="15%">
     112              <img height="45" src="gatherer_medium.gif" width="45"/>
     113            </td>
     114          </tr>
     115        </table>
    52116
    53     <xsl:apply-templates/>
     117        <xsl:apply-templates/>
     118      </body>
     119    </html>
    54120
    55121    <xsl:for-each select="Section">
     
    60126  </xsl:template>
    61127
     128
    62129  <xsl:template name="processTitle">
    63130    <xsl:param name="sectionNumber"/>
    64131    <xsl:param name="sectionTitle"/>
    65132
    66     <h2>Section <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle)"/></h2>
     133    <font face="Verdana" size="5">
     134      <strong>
     135        <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle)"/>
     136      </strong>
     137    </font>
    67138  </xsl:template>
    68139
Note: See TracChangeset for help on using the changeset viewer.