home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / OOo_3.0.1_Win32Intel_install_wJRE_en-US.exe / openofficeorg1.cab / layout.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2008-04-10  |  5.4 KB  |  209 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--*************************************************************************
  3.  *
  4.   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5.   
  6.   Copyright 2008 by Sun Microsystems, Inc.
  7.  
  8.   OpenOffice.org - a multi-platform office productivity suite
  9.  
  10.   $RCSfile: header.hxx,v $
  11.  
  12.   $Revision: 1.1 $
  13.  
  14.   This file is part of OpenOffice.org.
  15.  
  16.   OpenOffice.org is free software: you can redistribute it and/or modify
  17.   it under the terms of the GNU Lesser General Public License version 3
  18.   only, as published by the Free Software Foundation.
  19.  
  20.   OpenOffice.org is distributed in the hope that it will be useful,
  21.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23.   GNU Lesser General Public License version 3 for more details
  24.   (a copy is included in the LICENSE file that accompanied this code).
  25.  
  26.   You should have received a copy of the GNU Lesser General Public License
  27.   version 3 along with OpenOffice.org.  If not, see
  28.   <http://www.openoffice.org/license.html>
  29.   for a copy of the LGPLv3 License.
  30.  
  31.  ************************************************************************-->
  32. <!-- =================================================
  33.  
  34. This template is a skeleton for single level TOC pages 
  35. Do not overwrite this ! copy it and complete the missing
  36. code.
  37.  
  38. I use the @ character whereever there is a missing code, so 
  39. you can use a simple find to navigate and find the
  40. places...
  41.  
  42. ====================================================== -->
  43.  
  44. <xsl:stylesheet version="1.0" 
  45.    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  46.     xmlns="http://www.w3.org/1999/xhtml">
  47.     
  48.     <xsl:output method               = "html"
  49.                 media-type           = "text/html"
  50.                 indent               = "yes"
  51.                 doctype-public       = "-//W3C//DTD HTML 4.0 Transitional//EN"
  52.                 omit-xml-declaration = "yes"
  53.                 standalone           = "yes" /> 
  54.   
  55.      <!-- =============================
  56.                    ROOT
  57.      ================================== -->
  58.  
  59.  
  60.     <xsl:template  match="/">
  61.           <html>
  62.                    <xsl:call-template name="head"/>
  63.                   <xsl:call-template name="body"/>
  64.            </html>
  65.      </xsl:template>
  66.      
  67.      
  68.      <!-- =============================
  69.              Document properties
  70.              
  71.      This section contains templates which
  72.      give the document properties...
  73.                    
  74.      ================================== -->
  75.      
  76.      <!-- this tempaltes gives the
  77.      relative href of the document. To use
  78.      with the <a href="..."> attribute-->
  79.     
  80.     
  81.      <xsl:template match="document" mode="href">
  82.        <xsl:value-of select="concat(../@directory,'/')"/>
  83.        <xsl:if test="@dir">
  84.          <xsl:value-of select="concat(@dir,'/')"/>
  85.        </xsl:if>
  86.        <xsl:value-of select="@fn"/>
  87.      </xsl:template>
  88.      
  89.      
  90.     <xsl:template match="document/@title">
  91.          <xsl:param name="target" select="''"/>
  92.         
  93.          <span class="doctitle">
  94.              <a>
  95.              <xsl:attribute name="href"> 
  96.                 <xsl:apply-templates select=".." mode="href"/>
  97.             </xsl:attribute>
  98.             
  99.             <xsl:if test=" $target != ''">
  100.                 <xsl:attribute name="target">
  101.                     <xsl:value-of select="$target"/>
  102.                 </xsl:attribute>
  103.             </xsl:if>
  104.             
  105.             <xsl:value-of select="."/>
  106.             </a>
  107.          </span>
  108.          <br/>
  109.      </xsl:template>
  110.     
  111.  
  112.      <xsl:template match="document/@description">
  113.          <span class="docdescription">
  114.              <xsl:value-of select="."/>
  115.          </span>
  116.          <br/>
  117.      </xsl:template>
  118.      
  119.  
  120.      <xsl:template match="document/@author">
  121.          <span class="docauthor">
  122.              <xsl:value-of select="."/>
  123.          </span>
  124.          <br/>
  125.      </xsl:template>
  126.      
  127.  
  128.      <xsl:template match="document/@create-date">
  129.          <span class="doccreationdate">
  130.              <xsl:value-of select="."/>
  131.          </span>
  132.          <br/>
  133.      </xsl:template>
  134.      
  135.  
  136.      <xsl:template match="document/@update-date">
  137.          <span class="doclastchangedate">
  138.              <xsl:value-of select="."/>
  139.          </span>
  140.          <br/>
  141.      </xsl:template>
  142.      
  143.  
  144.      <xsl:template match="document/@filename">
  145.          <span class="docfilename">
  146.              <xsl:value-of select="."/>
  147.          </span>
  148.          <br/>
  149.      </xsl:template>
  150.  
  151.  
  152.      <xsl:template match="document/@format">
  153.          <span class="docfileformatinfo">
  154.              <xsl:value-of select="."/>
  155.          </span>
  156.          <br/>
  157.      </xsl:template>
  158.  
  159.  
  160.      <xsl:template match="document/@pages">
  161.          <span class="docnumberofpages">
  162.              <xsl:value-of select="."/>
  163.          </span>
  164.          <br/>
  165.      </xsl:template>
  166.      
  167.  
  168.      <xsl:template match="document/@size">
  169.          <span class="docsizeinkb">
  170.              <xsl:value-of select="."/>
  171.          </span>
  172.          <br/>
  173.      </xsl:template>
  174.      
  175.      <xsl:template match="document/@icon">
  176.        <img src="images/{.}"/>
  177.          <br/>
  178.      </xsl:template>
  179.     
  180.  
  181.      <!-- =============================
  182.                    HTML HEAD
  183.                    
  184.     this section should not be changed
  185.      ================================== -->
  186.      
  187.      <xsl:template name="head">
  188.          <head>
  189.                 <title>
  190.                      <xsl:value-of select="/session/general-info/@title"/>
  191.                 </title>
  192.                 <!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
  193.                 <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"/>
  194.                 <meta name="description" content="{/session/general-info/@description}"/>
  195.                 <meta name="keywords" content="{/session/general-info/@keywords}"/>
  196.                 <meta name="author" content="{/session/general-info/@author}"/>
  197.                 <meta name="email" content="{/session/general-info/@email}"/>
  198.                 <meta name="copyright" content="{/session/general-info/@copyright}"/>
  199.                 <!-- create date?
  200.                      update date?
  201.                      fav icon?
  202.                      -->
  203.              <link href="style.css" rel="stylesheet" type="text/css"/>
  204.  
  205.         </head>
  206.      </xsl:template>
  207.          
  208. </xsl:stylesheet>
  209.