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