ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: ws-axis/site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html book2menu.xsl document2html.xsl site2xhtml.xsl tab2menu.xsl
Date Thu, 27 Jan 2005 09:46:39 GMT
toshi       2005/01/27 01:46:39

  Added:       site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html
                        book2menu.xsl document2html.xsl site2xhtml.xsl
                        tab2menu.xsl
  Log:
  Migration for Forrest 0.6
  
  Revision  Changes    Path
  1.1                  ws-axis/site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html/book2menu.xsl
  
  Index: book2menu.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  book2menu.xsl generates the HTML menu.  See the imported book2menu.xsl for
  details.
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:import href="../../../common/xslt/html/book2menu.xsl"/>
  
    <xsl:template match="book">
      <div class="menuBar">
        <xsl:apply-templates select="menu"/>
      </div>
    </xsl:template>
  
    <xsl:template match="menu">
      <div class="menu">
        <span class="menuLabel"><xsl:value-of select="@label"/></span>
        <xsl:call-template name="base-menu"/>
      </div>
    </xsl:template>
  
    <xsl:template match="menu-item[@type='hidden']"/>
  
    <xsl:template match="menu-item">
      <div class="menuItem">
        <xsl:apply-imports/>
      </div>
    </xsl:template>
  
    <xsl:template name="selected">
      <span class="menuSelected">
        <xsl:value-of select="@label"/>
      </span>
    </xsl:template>
  
    <xsl:template name="print-external">
      <font color="#ffcc00">
        <span class="externalSelected">
          <xsl:apply-imports/>
        </span>
      </font>
    </xsl:template>
  
  
  </xsl:stylesheet>
  
  
  
  1.1                  ws-axis/site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  This stylesheet contains the majority of templates for converting documentv11
  to HTML.  It renders XML as HTML in this form:
  
    <div class="content">
     ...
    </div>
  
  ..which site2xhtml.xsl then combines with HTML from the index (book2menu.xsl)
  and tabs (tab2menu.xsl) to generate the final HTML.
  
  $Id: document2html.xsl,v 1.1 2005/01/27 09:46:39 toshi Exp $
  -->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:import href="../../../common/xslt/html/document2html.xsl"/>
  
  <!-- ====================================================================== -->
  <!-- document section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="document">
    <!-- checks if this is the included document to avoid neverending loop -->
    <xsl:if test="not(book)">
        <document>
        <xsl:choose>
  		<xsl:when test="header/title">
  		      <title><xsl:value-of select="header/title"/></title>
  		</xsl:when>
  		<xsl:otherwise>
  			<title>NO TITLE</title>
  		</xsl:otherwise>
  	</xsl:choose>
        <body>
          <xsl:apply-templates/>
          <xsl:if test="header/authors">
              <div align="right" id="authors">       
                 <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>
                       <!-- <a href="mailto:{@email}"> -->
                        <xsl:value-of select="@name" />
                       <!-- </a> -->
                    </xsl:for-each>
                </div>
           </xsl:if>         
          <xsl:call-template name="pdflink"/>
        </body>
        </document>
     </xsl:if>
  
    
      
     <xsl:if test="book">
      <xsl:apply-templates/>
     </xsl:if>
    </xsl:template>
  
     <xsl:template match="body">
      <xsl:apply-templates/>
    </xsl:template>
    
   
  <!-- ====================================================================== -->
  <!-- header section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="header">
    <!-- ignore on general document -->
   </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- body section -->
  <!-- ====================================================================== -->
  
     <xsl:template match="section">
  	
  	 <xsl:variable name = "level" select = "count(ancestor::section)+1" />
  	 
  	 <xsl:choose>
  	 	<xsl:when test="$level=1">
  	 	  <div class="h3"><h3><xsl:value-of select="title"/></h3></div>
  	      <xsl:apply-templates/>
  	 	</xsl:when>
  	 	<xsl:when test="$level=2">
  	 	  <div class="h4"><h4><xsl:value-of select="title"/></h4></div>
  	      <xsl:apply-templates/>
  	 	</xsl:when>
  	 	<xsl:when test="$level=3">
  	 	  <div class="h2"><h2><xsl:value-of select="title"/></h2></div>
  	      <xsl:apply-templates/>
  	 	</xsl:when>
  	 	<xsl:otherwise>
  	 	  <div class="h5"><h5><xsl:value-of select="title"/></h5></div>
  	      <xsl:apply-templates/>	 	 
  	 	</xsl:otherwise>
  	 </xsl:choose>
  
  	</xsl:template>  
  
   <xsl:template match="title">
   </xsl:template>
   	       
  <!-- ====================================================================== -->
  <!-- footer section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="footer">
    <!-- ignore on general documents -->
   </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- paragraph section -->
  <!-- ====================================================================== -->
  
    <xsl:template match="p">
      <xsl:apply-imports/>
    </xsl:template>
  
    <xsl:template match="note">
      <xsl:apply-imports/>
    </xsl:template>
  
    <xsl:template match="source">
      <xsl:apply-imports/>
    </xsl:template>
    
    <xsl:template match="//source/font">
      <font color="{@color}"><xsl:apply-templates/></font>
    </xsl:template>
      
    <xsl:template match="fixme">
      <xsl:apply-imports/>
    </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- list section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="ul|ol|dl">
      <xsl:apply-imports/>
   </xsl:template>
   
   <xsl:template match="li">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="sl">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="dt">
      <xsl:apply-imports/>
   </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- table section -->
  <!-- ====================================================================== -->
  
    <xsl:template match="table">
      <xsl:apply-imports/>
    </xsl:template>
  
    <xsl:template match="tr">
      <xsl:variable name="index"><xsl:number/></xsl:variable>
      <tr>
         <xsl:choose>
            <xsl:when test="($index mod 2) = 0">
               <xsl:attribute name="class">a</xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
               <xsl:attribute name="class">b</xsl:attribute>
            </xsl:otherwise>
         </xsl:choose>
       
         <xsl:apply-templates/>
      </tr>
    </xsl:template>
  
    <xsl:template match="th">
      <xsl:apply-imports/>
    </xsl:template>
  
    <xsl:template match="td">
      <xsl:apply-imports/>
    </xsl:template>
  
    <xsl:template match="tn">
      <xsl:apply-imports/>
    </xsl:template>
    
    <xsl:template match="caption">
      <!-- ignore since already used -->
    </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- markup section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="strong">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="em">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="code">
      <xsl:apply-imports/>
   </xsl:template>
   
  <!-- ====================================================================== -->
  <!-- images section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="figure">
      <xsl:apply-imports/>
   </xsl:template>
   
   <xsl:template match="img">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="icon">
      <xsl:apply-imports/>
   </xsl:template>
  
  <!-- ====================================================================== -->
  <!-- links section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="link">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="connect">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="jump">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="fork">
      <xsl:apply-imports/>
   </xsl:template>
  
   <xsl:template match="anchor">
      <xsl:apply-imports/>
   </xsl:template>  
  
  <!-- ====================================================================== -->
  <!-- specials section -->
  <!-- ====================================================================== -->
  
   <xsl:template match="br">
      <xsl:apply-imports/>
   </xsl:template>
  
    <!-- Generates the PDF link -->
    <xsl:template name="pdflink">
      <xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'"> 
        <div align="right" id="pdf"><a href="{$filename-noext}.pdf">
            <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/><br/>
            PDF</a>
        </div>
      </xsl:if>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  ws-axis/site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  site2xhtml.xsl is the final stage in HTML page production.  It merges HTML from
  document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
  footer, searchbar, css etc.  As input, it takes XML of the form:
  
  <site>
    <div class="menu">
      ...
    </div>
    <div class="tab">
      ...
    </div>
    <div class="content">
      ...
    </div>
  </site>
  
  $Id: site2xhtml.xsl,v 1.1 2005/01/27 09:46:39 toshi Exp $
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
  
    <xsl:template match="site">
        <html>
           <head>
              <xsl:comment>*** This is a generated file.  Do not edit.  ***</xsl:comment>
              <link type="text/css" href="{$root}skin/tigris.css" rel="stylesheet" />
              <link type="text/css" href="{$root}skin/mysite.css" rel="stylesheet" />
              <link type="text/css" href="{$root}skin/site.css"   rel="stylesheet" />
              <link type="text/css" href="{$root}skin/print.css"  rel="stylesheet" media="print"
/>
  
              <title>
                <xsl:value-of select="/site/document/title" />
              </title>
           </head>
      
    <body class="composite" bgcolor="white">
      
      <xsl:comment>================= start Banner ==================</xsl:comment>
        <div id="banner">
          <table border="0" summary="banner" cellspacing="0" cellpadding="8" width="100%">
           <tbody>        
            <tr>
              <xsl:comment>================= start Group Logo ==================</xsl:comment>
              <xsl:if test="$config/group-name">
              <td align="left">
                <div class="groupLogo">
                  <xsl:call-template name="renderlogo">
                    <xsl:with-param name="name" select="$config/group-name"/>
                    <xsl:with-param name="url" select="$config/group-url"/>
                    <xsl:with-param name="logo" select="$config/group-logo"/>
                    <xsl:with-param name="root" select="$root"/>
                  </xsl:call-template>
                </div>
              </td>
              </xsl:if>
              <xsl:comment>================= end Group Logo ==================</xsl:comment>
              <xsl:comment>================= start Project Logo ==================</xsl:comment>
              <td align="right">
                <div class="projectLogo">
                  <xsl:call-template name="renderlogo">
                    <xsl:with-param name="name" select="$config/project-name"/>
                    <xsl:with-param name="url" select="$config/project-url"/>
                    <xsl:with-param name="logo" select="$config/project-logo"/>
                    <xsl:with-param name="root" select="$root"/>
                  </xsl:call-template>
                </div>
              </td>
              <xsl:comment>================= end Project Logo ==================</xsl:comment>
              <xsl:comment>================= start Search ==================</xsl:comment>
              <td class="search" align="right" rowspan="2" valign="top">
                <xsl:if test="not($config/disable-search) or
                  $config/disable-search='false' and $config/searchsite-domain and
                  $config/searchsite-name">
                  <form method="get" action="http://www.google.com/search" target="_blank">
                    <table cellpadding="0" cellspacing="0" border="0" summary="search">
                      <tr>
                        <td colspan="3" bgcolor="#a5b6c6"><img class="spacer" src="{$spacer}"
alt="" width="1" height="10" /></td>
                      </tr>
                      <tr>
                        <td colspan="3"><img class="spacer" src="{$spacer}" alt=""
width="1" height="8" /></td>
                      </tr>
                      <tr>
                        <td><img class="spacer" src="{$spacer}" alt="" width="1"
height="1" /></td>
                        <td nowrap="nowrap">
                          <input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
                          <input type="text" id="query" name="q" size="10"/>
                          <img class="spacer" src="{$spacer}" alt="" width="5" height="1"
/>
                          <input type="submit" value="Go" name="Search"/>
                          <br />
                            Search <xsl:value-of select="$config/searchsite-name"/>
                            <!-- setting search options off for the moment -->
                            <!--
                            <input type="radio" name="web" value="web"/>web site&#160;&#160;<input
type="radio" name="mail" value="mail"/>mail lists
                            -->
                        </td>
                        <td><img class="spacer" src="{$spacer}" alt="" width="1"
height="1" /></td>
                      </tr>
  
                      <tr>
                        <td colspan="3"><img class="spacer" src="{$spacer}" alt=""
width="1" height="7" /></td>
                      </tr>
  
                      <tr>
                        <td class="bottom-left-thick"></td>
                        <td bgcolor="#a5b6c6"><img class="spacer" src="{$spacer}"
alt="" width="1" height="1" /></td>
                        <td class="bottom-right-thick"></td>
                      </tr>
                    </table>
                  </form>
                </xsl:if>
              </td>
              <xsl:comment>================= end Search ==================</xsl:comment>
            </tr>
           </tbody>          
          </table>
        </div>
      <xsl:comment>================= end Banner ==================</xsl:comment>
  
      <xsl:comment>================= start Main ==================</xsl:comment>
      <table id="breadcrumbs" summary="nav" border="0" cellspacing="0" cellpadding="0"
width="100%">
       <tbody>    
        <xsl:comment>================= start Status ==================</xsl:comment>
        <tr class="status">
          <td>
            <xsl:comment>================= start BreadCrumb ==================</xsl:comment>
              <a href="{$config/trail/link1/@href}"><xsl:value-of select="$config/trail/link1/@name"
/></a> 
              <xsl:if test = "($config/trail/link2/@name)and(normalize-space($config/trail/link2/@name)!='')"><xsl:text>
| </xsl:text></xsl:if>                                 
              <a href="{$config/trail/link2/@href}"><xsl:value-of select="$config/trail/link2/@name"
/></a>
              <xsl:if test = "($config/trail/link3/@name)and(normalize-space($config/trail/link3/@name)!='')"><xsl:text>
| </xsl:text></xsl:if>                                 
              <a href="{$config/trail/link3/@href}"><xsl:value-of select="$config/trail/link3/@name"
/></a>
            <!-- useful when we have <link> elements instead of link(n:=1..3)  
            <xsl:for-each select="$config/trail/link">
              <xsl:if test="position()!=1">|</xsl:if>
              <a href="{@href}"><xsl:value-of select="@name"/></a>
            </xsl:for-each>
            -->
            <xsl:comment>================= end BreadCrumb ==================</xsl:comment>
          </td>
          <td id="tabs">
            <xsl:comment>================= start Tabs ==================</xsl:comment>
            <xsl:apply-templates select="div[@class='tab']"/>
            <xsl:comment>================= end Tabs ==================</xsl:comment>
          </td>
        </tr>
       </tbody>      
      </table>      
        <xsl:comment>================= end Status ==================</xsl:comment>
  
  
      <table border="0" summary="" cellspacing="0" cellpadding="8" width="100%" id="main">
       <tbody>
        <tr valign="top">
          <xsl:comment>================= start Menu ==================</xsl:comment>
          <td id="leftcol">
            <div id="navcolumn">
              <xsl:apply-templates select="div[@class='menuBar']"/>
            </div>
          </td>
          <xsl:comment>================= end Menu ==================</xsl:comment>
  
          <xsl:comment>================= start Content ==================</xsl:comment>
          <td>
            <div id="bodycol">
              <div class="app">
                <div align="center">
                  <h1><xsl:value-of select="/site/document/title" /></h1>
                  <xsl:if test="/site/document/subtitle">
                    <h2><xsl:value-of select="/site/document/subtitle" /></h2>
                  </xsl:if>
                 </div>
                  <div class="h3">
                     <xsl:copy-of select="/site/document/body/node()|@*" />
                  </div>
                </div>
                      <xsl:apply-templates select="div[@class='content']"/>
              </div>
          </td>
          <xsl:comment>================= end Content ==================</xsl:comment>
        </tr>
       </tbody>      
      </table>
      <xsl:comment>================= end Main ==================</xsl:comment>
  
      <xsl:comment>================= start Footer ==================</xsl:comment>
      <div id="footer">
      <table border="0" width="100%" cellpadding="4" cellspacing="0" summary="footer">
       <tbody>
        <tr>
          <xsl:comment>================= start Copyright ==================</xsl:comment>
          <td colspan="2">
            <div align="center">
              <div class="copyright">
                Copyright &#169; <xsl:value-of select="$config/year"/>&#160;<xsl:value-of
                select="$config/vendor"/>. All rights reserved.
              </div>
            </div>
          </td>
          <xsl:comment>================= end Copyright ==================</xsl:comment>
        </tr>
        <tr>
        <td align="left">
          <xsl:comment>================= start Host ==================</xsl:comment>
          <xsl:if test="$config/host-logo and not($config/host-logo = '')">
            <div align="left">
              <div class="host">
                <xsl:call-template name="renderlogo">
                  <xsl:with-param name="name" select="$config/host-name"/>
                  <xsl:with-param name="url" select="$config/host-url"/>
                  <xsl:with-param name="logo" select="$config/host-logo"/>
                  <xsl:with-param name="root" select="$root"/>
                </xsl:call-template>
              </div>
            </div>
          </xsl:if>
          <xsl:comment>================= end Host ==================</xsl:comment>
        </td>
        <td align="right">
          <xsl:comment>================= start Credits ==================</xsl:comment>
          <div align="right">
            <div class="credit">
              <xsl:if test="$filename = 'index.html'">
                <xsl:call-template name="compliancy-logos"/>
                <xsl:if test="$config/credits">
                  <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
                    <xsl:call-template name="renderlogo">
                      <xsl:with-param name="name" select="name"/>
                      <xsl:with-param name="url" select="url"/>
                      <xsl:with-param name="logo" select="image"/>
                      <xsl:with-param name="root" select="$root"/>
                      <xsl:with-param name="width" select="width"/>
                      <xsl:with-param name="height" select="height"/>
                    </xsl:call-template>
                  </xsl:for-each>
                </xsl:if>
              </xsl:if>
            </div>
          </div>
          <xsl:comment>================= end Credits ==================</xsl:comment>
          </td>
        </tr>
       </tbody>
      </table>
      </div>
      <xsl:comment>================= end Footer ==================</xsl:comment>
  
        </body>
      </html>
      </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  ws-axis/site/src4forrest-060/java/src/documentation/skins/ws-site/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!--
  This stylesheet generates 'tabs' at the top left of the screen.
  See the imported tab2menu.xsl for details.
  -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    <xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
  
    <xsl:template name="pre-separator">
    </xsl:template>
  
    <xsl:template name="post-separator">
    </xsl:template>
  
    <xsl:template name="separator">
      <xsl:text> | </xsl:text>
    </xsl:template>
  
    <xsl:template name="selected" mode="print">
      <span class="selectedTab">
        <xsl:call-template name="base-selected"/>
      </span>
    </xsl:template>
  
    <xsl:template name="not-selected" mode="print">
      <span class="unselectedTab">
      <!-- Called from 'not-selected' -->
       <a>
        <xsl:attribute name="href">
          <xsl:call-template name="calculate-tab-href">
            <xsl:with-param name="tab" select="."/>
            <xsl:with-param name="path" select="$path"/>
          </xsl:call-template>
        </xsl:attribute>
        <xsl:value-of select="@label"/>
       </a>
      </span>
    </xsl:template>
  </xsl:stylesheet>
  
  
  

Mime
View raw message