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 / ms2ooo_docpr.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2010-12-01  |  6.0 KB  |  102 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. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" exclude-result-prefixes="w wx aml o dt fo v">
  29.     <xsl:template match="o:DocumentProperties">
  30.         <office:meta>
  31.             <meta:generator>Microsoft Word 2003</meta:generator>
  32.             <dc:title>
  33.                 <xsl:value-of select="o:Title"/>
  34.             </dc:title>
  35.             <dc:description>
  36.                 <xsl:value-of select="o:Description"/>
  37.             </dc:description>
  38.             <dc:subject>
  39.                 <xsl:value-of select="o:Subject"/>
  40.             </dc:subject>
  41.             <meta:initial-creator>
  42.                 <xsl:value-of select="o:Author"/>
  43.             </meta:initial-creator>
  44.             <meta:creation-date>
  45.                 <xsl:value-of select="substring-before( o:Created, 'Z')"/>
  46.             </meta:creation-date>
  47.             <dc:creator>
  48.                 <xsl:value-of select="o:LastAuthor"/>
  49.             </dc:creator>
  50.             <xsl:if test="string-length(substring-before( o:LastSaved, 'Z')) > 0">
  51.                 <dc:date>
  52.                     <xsl:value-of select="substring-before( o:LastSaved, 'Z')"/>
  53.                 </dc:date>
  54.             </xsl:if>
  55.             <!-- comment out the below line now because Oasis format doesn't allow the meta:print-by to be empty element -->
  56.             <!--meta:printed-by /-->
  57.             <xsl:if test="string-length(substring-before( o:LastPrinted, 'Z')) > 0">
  58.                 <!--
  59.             <meta:print-date>
  60.                 <xsl:value-of select="substring-before( o:LastPrinted, 'Z')"/>
  61.             </meta:print-date>
  62.             -->
  63.             </xsl:if>
  64.             <meta:keyword>
  65.                 <xsl:value-of select="o:Keywords"/>
  66.             </meta:keyword>
  67.             <meta:editing-cycles>
  68.                 <xsl:value-of select="o:Revision"/>
  69.             </meta:editing-cycles>
  70.             <meta:editing-duration>
  71.                 <xsl:if test="o:TotalTime">
  72.                     <xsl:value-of select="concat('PT', floor(o:TotalTime div 60), 'H', o:TotalTime mod 60, 'M0S')"/>
  73.                 </xsl:if>
  74.             </meta:editing-duration>
  75.             <meta:user-defined meta:name="Category" meta:value-type="string">
  76.                 <xsl:value-of select="o:Category"/>
  77.             </meta:user-defined>
  78.             <meta:user-defined meta:name="Manager" meta:value-type="string">
  79.                 <xsl:value-of select="o:Manager"/>
  80.             </meta:user-defined>
  81.             <meta:user-defined meta:name="Company" meta:value-type="string">
  82.                 <xsl:value-of select="o:Company"/>
  83.             </meta:user-defined>
  84.             <meta:user-defined meta:name="Version" meta:value-type="string">
  85.                 <xsl:value-of select="o:Version"/>
  86.             </meta:user-defined>
  87.             <meta:user-defined meta:name="HyperlinkBase" meta:value-type="string">
  88.                 <xsl:value-of select="o:HyperlinkBase"/>
  89.             </meta:user-defined>
  90.             <xsl:apply-templates select="../o:CustomDocumentProperties"/>
  91.             <meta:document-statistic meta:page-count="{o:Pages}" meta:paragraph-count="{o:Paragraphs}" meta:word-count="{o:Words}" meta:character-count="{o:Characters}"/>
  92.         </office:meta>
  93.     </xsl:template>
  94.     <xsl:template match="o:CustomDocumentProperties">
  95.         <xsl:for-each select="node()[@dt:dt]">
  96.             <meta:user-defined meta:name="{local-name()}" meta:value-type="{@dt:dt}">
  97.                 <xsl:value-of select="."/>
  98.             </meta:user-defined>
  99.         </xsl:for-each>
  100.     </xsl:template>
  101. </xsl:stylesheet>
  102.