You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2003/12/26 22:03:54 UTC

cvs commit: xml-forrest/src/core/context/skins/tigris-style/xslt/html document2html.xsl site2xhtml.xsl

nicolaken    2003/12/26 13:03:54

  Modified:    src/core/context/skins/tigris-style/xslt/html
                        document2html.xsl site2xhtml.xsl
  Log:
  Fix what remained to be fixed.
  OTOMH:
  - tables now render with the correct style
  - the document font is now of
  - removes font sizing javascript as it doesn't work on this skin
    as it doesn't use relative values but "small" or "xx-small" that
    can be still scaled but with the browser controls
  - moved the search bar only on the left navigation
  - moved round the breadcrumbs to make space for hierarchical tabs
  - fixed the rendering of notes, warnings and fixmes
  
  Revision  Changes    Path
  1.2       +55 -13    xml-forrest/src/core/context/skins/tigris-style/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/skins/tigris-style/xslt/html/document2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- document2html.xsl	22 Dec 2003 09:56:11 -0000	1.1
  +++ document2html.xsl	26 Dec 2003 21:03:54 -0000	1.2
  @@ -23,18 +23,24 @@
          <!-- ( ================= middle NavBar ================== ) -->
           <tr>
           <td class="tasknav" >
  -        <div align="left">
  +          <div align="left">
  +           <!-- 
  +                site2html.xsl will search for this as 
  +                   
  +                   td[@class='tasknav']/div[@align='left']
  +
  +                to insert the breadcrumbs.   
  +          -->
  +          </div>
  +        </td>
  +        <td id="issueid" class="tasknav">
  +        <div align="right">
               <xsl:call-template name="pdflink"/>
               <xsl:call-template name="printlink"/>
               <xsl:call-template name="xmllink"/>
  +	         &#160;
           </div>
           </td>
  -        <td id="issueid" class="tasknav">
  -        <div align="right">Font size:
  -	          &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
  -	          &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
  -	          &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>       </div>
  -        </td>
          </tr>
         </table>
        </div>
  @@ -168,10 +174,27 @@
   
     </xsl:template>  
   
  -  <xsl:template match="fixme | note | warning">
  -    <xsl:apply-imports/>
  +  <xsl:template match="fixme">
  +    <div class="warningmessage">
  +      <p><strong>Fixme (<xsl:value-of select="@author"/>)</strong></p>
  +      <xsl:apply-templates/>
  +    </div>
     </xsl:template>
  -
  +  
  +  <xsl:template match="note">
  +    <div class="infomessage">
  +      <p><strong>Note</strong></p>
  +      <xsl:apply-templates/>
  +    </div>
  +  </xsl:template>
  +  
  +  <xsl:template match="warning">
  +    <div class="errormessage">
  +      <p><strong>Warning</strong></p>
  +      <xsl:apply-templates/>
  +    </div>
  +  </xsl:template>
  +  
     <xsl:template match="link">
       <xsl:apply-imports/>
     </xsl:template>
  @@ -207,11 +230,30 @@
     <xsl:template match="figure">
       <xsl:apply-imports/>
     </xsl:template>
  -
  +  
     <xsl:template match="table">
  -    <xsl:apply-imports/>
  +   <div class="h4">
  +    <xsl:apply-templates select="@id"/>
  +    <xsl:if test="caption">
  +        <h4><xsl:value-of select="caption"/></h4>
  +    </xsl:if> 
  +    <xsl:apply-templates select="caption"/>
  +      <table border="1" cellspacing="2" cellpadding="3" width="100%" class="grid">
  +        <xsl:if test="@cellspacing"><xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute></xsl:if>
  +        <xsl:if test="@cellpadding"><xsl:attribute name="cellpadding"><xsl:value-of select="@cellpadding"/></xsl:attribute></xsl:if>
  +        <xsl:if test="@border"><xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute></xsl:if>
  +        <xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
  +        <xsl:if test="@bgcolor"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if>
  +      
  +        <xsl:apply-templates/>
  +    </table>
  +   </div>    
     </xsl:template>
   
  +  <xsl:template match="caption">
  +    <!-- do not show caption elements, they are already in other places-->  
  +  </xsl:template>
  +  
     <xsl:template match="title">
       <!-- do not show title elements, they are already in other places-->
     </xsl:template>
  
  
  
  1.2       +30 -13    xml-forrest/src/core/context/skins/tigris-style/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/skins/tigris-style/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- site2xhtml.xsl	22 Dec 2003 09:56:11 -0000	1.1
  +++ site2xhtml.xsl	26 Dec 2003 21:03:54 -0000	1.2
  @@ -29,19 +29,18 @@
           <style type="text/css">
             /* <![CDATA[ */ 
             @import "]]><xsl:value-of select="$root"/><![CDATA[skin/tigris.css";  
  +          @import "]]><xsl:value-of select="$root"/><![CDATA[skin/quirks.css"; 
             @import "]]><xsl:value-of select="$root"/><![CDATA[skin/inst.css"; 
             /*  ]]> */
           </style>
           <link rel="stylesheet" type="text/css" href="{$root}skin/print.css" media="print" />
           <script src="{$root}skin/tigris.js" type="text/javascript"></script>
  -        <script type="text/javascript" language="javascript" src="{$root}skin/fontsize.js"></script>
           <script type="text/javascript" language="javascript" src="{$root}skin/menu.js"></script>
           <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
           <meta http-equiv="Content-type" content="text/html" />
           <meta http-equiv="Content-style-type" content="text/css" />
         </head>
         <body onload="init();focus()" marginwidth="0" marginheight="0" class="composite">
  -        <script type="text/javascript">ndeSetTextSize();</script>
   
           <!--
             +=========================+
  @@ -111,6 +110,9 @@
           
           <!-- ( =================  Search ================== ) -->        
           <td align="right" valign="top">
  +          <!--
  +            per default only navigation search is present
  +            
             <xsl:if test="not($config/disable-search) or
               $config/disable-search='false' and $config/searchsite-domain and
               $config/searchsite-name">
  @@ -128,6 +130,7 @@
                </form>
             </div>
            </xsl:if>
  +         -->
           </td>       
          </tr>   
         </table>  
  @@ -137,11 +140,15 @@
         <xsl:apply-templates select="div[@class='tabs']"/>
   
     <div id="breadcrumbs">
  -    <xsl:call-template name="breadcrumbs"/>
  +    subtabs | go | here
     </div>
   
     </xsl:template>
     
  +  <xsl:template match="td[@class='tasknav']/div[@align='left']" >
  +    <xsl:call-template name="breadcrumbs"/>
  +  </xsl:template>
  +  
     <xsl:template name="centerstrip" >
      <!--
        +=========+======================+
  @@ -212,30 +219,37 @@
         </xsl:if>
       </div>
       <!-- ( ================= end Menu items ================== ) -->
  -    
  -    <form action="" method="get">
  +
  +    <!-- ( =================  Search ================== ) -->       
  +        
  +   <xsl:if test="not($config/disable-search) 
  +                 or $config/disable-search='false' 
  +                 and $config/searchsite-domain 
  +                 and $config/searchsite-name">
  +    <form action="http://www.google.com/search" method="get">
         <div id="searchbox" class="toolgroup">
          <div class="label"><strong>Search</strong></div>
          <div class="body">
  -        <div>
  +        <div>the <xsl:value-of select="$config/searchsite-name"/> site
  +<!--
           <select name="scope">
  -
            <option value="projectAndSubs" selected="selected">This project</option>
            <option value="myprojects">My projects</option>
            <option value="domain" >All projects</option>
           </select>
  +-->
          </div>
          <div>
  -        <input type="hidden" name="resultsPerPage" value="40" /> 
  -        <input type="text" name="query" size="10" /> 
  -        <input type="submit" name="Button" value="Go" />
  +        <input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
  +        <input type="text" id="query" name="q" size="10" /> 
  +        <input type="submit" value="Search" name="Search" />
   
          </div>
  -       <div><a href="#">Advanced search</a>    </div>
  +       <!--<div><a href="#">Advanced search</a>    </div>-->
         </div>
        </div>
        </form>
  - 
  +    </xsl:if>    
       
    	<xsl:if test="$filename = 'index.html' and $config/credits">
         <div id="admfun" class="toolgroup">
  @@ -276,6 +290,9 @@
   
     </xsl:template>
    
  +  <xsl:template match="toc|toc2|tocc|toca">
  +  </xsl:template>
  +  
     <xsl:template name="mainarea">
         <xsl:apply-templates select="div[@class='content']"/>
     </xsl:template>