home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 December / CHIP_CD_2004-12.iso / bonus / oo / OOo_1.1.3_ru_RU_infra_WinIntel_install.exe / $PLUGINSDIR / f_0375 / docbooktosoffheadings.xsl
Extensible Markup Language  |  2004-10-09  |  40KB  |  1,140 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  #  The Contents of this file are made available subject to the terms of
  4.  #  either of the following licenses
  5.  #
  6.  #         - GNU Lesser General Public License Version 2.1
  7.  #         - Sun Industry Standards Source License Version 1.1
  8.  #
  9.  #  Sun Microsystems Inc., October, 2000
  10.  #
  11.  #  GNU Lesser General Public License Version 2.1
  12.  #  =============================================
  13.  #  Copyright 2000 by Sun Microsystems, Inc.
  14.  #  901 San Antonio Road, Palo Alto, CA 94303, USA
  15.  #
  16.  #  This library is free software; you can redistribute it and/or
  17.  #  modify it under the terms of the GNU Lesser General Public
  18.  #  License version 2.1, as published by the Free Software Foundation.
  19.  #
  20.  #  This library 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 GNU
  23.  #  Lesser General Public License for more details.
  24.  #
  25.  #  You should have received a copy of the GNU Lesser General Public
  26.  #  License along with this library; if not, write to the Free Software
  27.  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28.  #  MA  02111-1307  USA
  29.  #
  30.  #
  31.  #  Sun Industry Standards Source License Version 1.1
  32.  #  =================================================
  33.  #  The contents of this file are subject to the Sun Industry Standards
  34.  #  Source License Version 1.1 (the "License"); You may not use this file
  35.  #  except in compliance with the License. You may obtain a copy of the
  36.  #  License at http://www.openoffice.org/license.html.
  37.  #
  38.  #  Software provided under this License is provided on an "AS IS" basis,
  39.  #  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  40.  #  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
  41.  #  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
  42.  #  See the License for the specific provisions governing your rights and
  43.  #  obligations concerning the Software.
  44.  #
  45.  #  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
  46.  #
  47.  #  Copyright: 2000 by Sun Microsystems, Inc.
  48.  #
  49.  #  All Rights Reserved.
  50.  #
  51.  #  Contributor(s): _______________________________________
  52.  #
  53.  #
  54.  -->
  55. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
  56. xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing"  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config" office:class="text" office:version="1.0">
  57.     <xsl:decimal-format name="staff" digit="D" />
  58. <xsl:template match="/">
  59.     <xsl:element name="office:document">
  60.             <office:meta>
  61.         <meta:generator>StarOffice 6.1 (Solaris Sparc)</meta:generator>
  62.         <dc:title><xsl:value-of select="/article/articleinfo/title"/></dc:title>
  63.         <dc:description></dc:description>
  64.         <dc:subject></dc:subject>
  65.         <meta:creation-date>2002-07-15T12:38:53</meta:creation-date>
  66.         <dc:date><xsl:value-of select="article/articleinfo/pubdate"/></dc:date>
  67.         <dc:language><xsl:value-of select="article/@lang"/></dc:language>
  68.         <meta:editing-cycles>21</meta:editing-cycles>
  69.         <meta:editing-duration>P1DT0H11M54S</meta:editing-duration>
  70.         <meta:user-defined meta:name="Info 1"/>
  71.         <meta:user-defined meta:name="Info 2"/>
  72.         <meta:user-defined meta:name="Info 3"/>
  73.         <meta:user-defined meta:name="Info 4"/>
  74.         <meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="42" meta:word-count="144" meta:character-count="820"/>
  75.     </office:meta>
  76.     <office:automatic-styles>
  77.         <style:style style:name="fr1" style:family="graphics" style:parent-style-name="Graphics" ><style:properties style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="1" draw:color-inversion="false" draw:transparency="-100%" draw:color-mode="standard" ></style:properties>
  78. </style:style>
  79.  
  80.         <style:style style:name="Table1" style:family="table">
  81.             <style:properties style:width="14.649cm" table:align="margins"/>
  82.         </style:style>
  83.         <style:style style:name="Table1.A" style:family="table-column">
  84.             <style:properties style:column-width="2.93cm" style:rel-column-width="13107*"/>
  85.         </style:style>
  86.         <style:style style:name="Table1.A1" style:family="table-cell">
  87.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="0.002cm solid #000000" fo:border-bottom="0.002cm solid #000000"/>
  88.         </style:style>
  89.         <style:style style:name="Table1.E1" style:family="table-cell">
  90.             <style:properties fo:padding="0.097cm" fo:border="0.002cm solid #000000"/>
  91.         </style:style>
  92.         <style:style style:name="Table1.A2" style:family="table-cell">
  93.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
  94.         </style:style>
  95.         <style:style style:name="Table1.E2" style:family="table-cell">
  96.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="0.002cm solid #000000" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
  97.         </style:style>
  98.         <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Ordered List"/>
  99.         <style:style style:name="T1" style:family="text" style:parent-style-name="Source Text">
  100.             <style:properties fo:font-style="normal"/>
  101.         </style:style>
  102.         
  103.         <style:page-master style:name="pm1">
  104.             <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
  105.                 <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
  106.             </style:properties>
  107.             <style:header-style/>
  108.             <style:footer-style/>
  109.         </style:page-master>
  110.     </office:automatic-styles>
  111.     <office:master-styles>
  112.         <style:master-page style:name="Standard" style:page-master-name="pm1"/>
  113.     </office:master-styles>
  114.             <office:body>                 
  115.                 <xsl:apply-templates/>
  116.             </office:body>
  117.     </xsl:element>
  118. </xsl:template>
  119.  
  120. <xsl:template match="subtitle">
  121. <xsl:choose>
  122.     <xsl:when test="parent::table">
  123.             <xsl:apply-templates/>
  124.     </xsl:when>
  125.     <xsl:when test="parent::informaltable">
  126.             <xsl:apply-templates/>
  127.     </xsl:when>
  128.     <xsl:otherwise>
  129.         <xsl:element name="text:p">                
  130.                     <xsl:attribute name="text:style-name">Section SubTitle</xsl:attribute>
  131.         </xsl:element>
  132.     </xsl:otherwise>
  133. </xsl:choose>
  134. </xsl:template>
  135.  
  136.  
  137.  
  138.  
  139. <xsl:template match="title">
  140. <xsl:choose>
  141.     <xsl:when test="parent::figure">
  142.     </xsl:when>
  143.     <xsl:when test="parent::table">
  144.     </xsl:when>
  145.     <xsl:when test="parent::sect1">
  146.     </xsl:when>
  147. <xsl:when test="parent::sect2">
  148.     </xsl:when>
  149. <xsl:when test="parent::sect3">
  150.     </xsl:when>
  151. <xsl:when test="parent::sect4">
  152.     </xsl:when>
  153. <xsl:when test="parent::sect5">
  154.     </xsl:when>
  155.     <xsl:when test="parent::informaltable">
  156.             <xsl:apply-templates/>
  157.     </xsl:when>
  158.     
  159.     <xsl:otherwise>
  160.         <xsl:element name="text:p">                
  161.             <xsl:choose>    
  162.                 
  163.                 <xsl:when test="parent::appendix">
  164.                                  <xsl:attribute name="text:style-name">Appendix Title</xsl:attribute>     
  165.                 </xsl:when>
  166.              </xsl:choose>
  167.             <xsl:apply-templates/>
  168.         </xsl:element>
  169.     </xsl:otherwise>
  170. </xsl:choose>
  171. </xsl:template>
  172.  
  173. <xsl:template match="articleinfo">
  174.     <xsl:element name="text:section">
  175.         <xsl:attribute name="text:style-name">ArticleInfo</xsl:attribute>
  176.         <xsl:attribute name="text:name">ArticleInfo</xsl:attribute>
  177.             <xsl:if test="/article/articleinfo/title !=''">
  178.                          <xsl:element name="text:p">
  179.                             <xsl:attribute name="text:style-name">Document Title</xsl:attribute>
  180.                             <xsl:value-of select="/article/articleinfo/title"/>
  181.                         </xsl:element>
  182.                         <xsl:if test="/article/articleinfo/subtitle !=''">
  183.                             <xsl:element name="text:p">
  184.                                 <xsl:attribute name="text:style-name">Document SubTitle</xsl:attribute>
  185.                                 <xsl:value-of select="/article/articleinfo/subtitle"/>
  186.                             </xsl:element>
  187.                         </xsl:if>
  188.                  </xsl:if>
  189.             <xsl:apply-templates/>
  190.     </xsl:element>
  191.     
  192. </xsl:template>
  193.  
  194. <xsl:template match="appendix">
  195.     <xsl:element name="text:section">
  196.         <xsl:attribute name="text:style-name">Appendix</xsl:attribute>
  197.         <xsl:attribute name="text:name">Appendix</xsl:attribute>
  198.             <xsl:apply-templates/>
  199.     </xsl:element>
  200.     
  201. </xsl:template>
  202.  
  203. <!--
  204. <xsl:template match="author">
  205.     <xsl:apply-templates/>
  206. </xsl:template>
  207.  
  208. <xsl:template match="firstname">
  209.      <xsl:element name="text:variable-set">
  210.          <xsl:attribute name="text:name">
  211.              <xsl:if test="ancestor::articleinfo/author">
  212.                  <xsl:text disable-output-escaping="yes">articleinfo.author</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  213.              </xsl:if>
  214.         </xsl:attribute>
  215.         <xsl:apply-templates/>
  216.     </xsl:element>
  217.  
  218. </xsl:template>-->
  219.  
  220. <xsl:template match="articleinfo/title">
  221.     <!-- <xsl:element name="text:variable-decls">
  222.                  <xsl:element name="text:variable-decl">
  223.                      <xsl:attribute name="text:value-type">
  224.                          <xsl:text>string</xsl:text>    
  225.                      </xsl:attribute>
  226.                   <xsl:attribute name="text:name">
  227.                      <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text>
  228.                       </xsl:attribute>
  229.                    </xsl:element>
  230.                    
  231.           </xsl:element>
  232.           <xsl:element name="text:p">
  233.      <xsl:element name="text:variable-set">
  234.          <xsl:attribute name="text:value-type">
  235.                          <xsl:text>string</xsl:text>    
  236.                      </xsl:attribute>
  237.          <xsl:attribute name="text:name">
  238.              <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text>
  239.         </xsl:attribute>
  240.         <xsl:apply-templates/>
  241.     </xsl:element>    
  242.     </xsl:element>-->
  243. </xsl:template>
  244.  
  245. <xsl:template match="articleinfo/subtitle">
  246.      <xsl:element name="text:variable-decls">
  247.                  <xsl:element name="text:variable-decl">
  248.                      <xsl:attribute name="text:value-type">
  249.                          <xsl:text>string</xsl:text>    
  250.                      </xsl:attribute>
  251.                   <xsl:attribute name="text:name">
  252.                      <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text>
  253.                       </xsl:attribute>
  254.                    </xsl:element>
  255.           </xsl:element>
  256.           <xsl:element name="text:p">
  257.      <xsl:element name="text:variable-set">
  258.          <xsl:attribute name="text:value-type">
  259.                          <xsl:text>string</xsl:text>    
  260.                      </xsl:attribute>
  261.          <xsl:attribute name="text:name">
  262.              <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text>
  263.         </xsl:attribute>
  264.         <xsl:apply-templates/>
  265.     </xsl:element>
  266.     </xsl:element>
  267. </xsl:template>
  268.  
  269. <xsl:template match="articleinfo/edition">
  270.      <xsl:element name="text:variable-decls">
  271.                  <xsl:element name="text:variable-decl">
  272.                      <xsl:attribute name="text:value-type">
  273.                          <xsl:text>string</xsl:text>    
  274.                      </xsl:attribute>
  275.                   <xsl:attribute name="text:name">
  276.                      <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text>
  277.                       </xsl:attribute>
  278.                    </xsl:element>
  279.           </xsl:element>
  280.           <xsl:element name="text:p">
  281.      <xsl:element name="text:variable-set">
  282.          <xsl:attribute name="text:value-type">
  283.                          <xsl:text>string</xsl:text>    
  284.                  </xsl:attribute>
  285.          <xsl:attribute name="text:name">
  286.              <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text>
  287.         </xsl:attribute>
  288.         <xsl:apply-templates/>
  289.     </xsl:element>
  290.     </xsl:element>
  291. </xsl:template>
  292.  
  293. <xsl:template match="articleinfo/releaseinfo">
  294.       <xsl:element name="text:variable-decls">
  295.                  <xsl:element name="text:variable-decl">
  296.                      <xsl:attribute name="text:value-type">
  297.                          <xsl:text>string</xsl:text>    
  298.                      </xsl:attribute>
  299.                   <xsl:attribute name="text:name">
  300.                      <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text><xsl:value-of select="count(preceding-sibling::releaseinfo)"/>
  301.                       </xsl:attribute>
  302.                    </xsl:element>
  303.           </xsl:element>
  304.           <xsl:element name="text:p">
  305.      <xsl:element name="text:variable-set">
  306.          <xsl:attribute name="text:value-type">
  307.                          <xsl:text>string</xsl:text>    
  308.                 </xsl:attribute>
  309.          <xsl:attribute name="text:name">
  310.              <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text><xsl:value-of select="count(preceding-sibling::releaseinfo)"/>
  311.         </xsl:attribute>
  312.         <xsl:apply-templates/>
  313.     </xsl:element>
  314.     </xsl:element>
  315. </xsl:template>
  316.  
  317.  
  318. <xsl:template match="author/firstname">
  319.       <xsl:element name="text:variable-decls">
  320.                  <xsl:element name="text:variable-decl">
  321.                      <xsl:attribute name="text:value-type">
  322.                          <xsl:text>string</xsl:text>    
  323.                      </xsl:attribute>
  324.                     
  325.                   <xsl:attribute name="text:name">
  326.                       <xsl:if test="ancestor::articleinfo">
  327.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname_</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  328.                  </xsl:if>
  329.                       </xsl:attribute>
  330.                    </xsl:element>
  331.           </xsl:element>
  332.           <xsl:element name="text:p">
  333.      <xsl:element name="text:variable-set">
  334.          <xsl:attribute name="text:value-type">
  335.                          <xsl:text>string</xsl:text>    
  336.                 </xsl:attribute>
  337.          <xsl:attribute name="text:name">
  338.              <xsl:if test="ancestor::articleinfo">
  339.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname_</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  340.             </xsl:if>
  341.         </xsl:attribute>
  342.         <xsl:apply-templates/>
  343.     </xsl:element>
  344.     </xsl:element>
  345. </xsl:template>
  346.  
  347.  
  348.  
  349. <xsl:template match="articleinfo/copyright/year">
  350.       <xsl:element name="text:variable-decls">
  351.                  <xsl:element name="text:variable-decl">
  352.                      <xsl:attribute name="text:value-type">
  353.                          <xsl:text>string</xsl:text>    
  354.                      </xsl:attribute>
  355.                     
  356.                   <xsl:attribute name="text:name">
  357.                       <xsl:if test="ancestor::articleinfo/copyright">
  358.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.year_</xsl:text><xsl:value-of select="count(preceding-sibling::year)"/>
  359.                  </xsl:if>
  360.                       </xsl:attribute>
  361.                    </xsl:element>
  362.           </xsl:element>
  363.           <xsl:element name="text:p">
  364.      <xsl:element name="text:variable-set">
  365.          <xsl:attribute name="text:value-type">
  366.                          <xsl:text>string</xsl:text>    
  367.                 </xsl:attribute>
  368.          <xsl:attribute name="text:name">
  369.              <xsl:if test="ancestor::articleinfo/copyright">
  370.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.year_</xsl:text><xsl:value-of select="count(preceding-sibling::year)"/>
  371.                  </xsl:if>
  372.         </xsl:attribute>
  373.         <xsl:apply-templates/>
  374.     </xsl:element>
  375.     </xsl:element>
  376. </xsl:template>
  377.  
  378. <xsl:template match="authorgroup">
  379.     <xsl:apply-templates/>
  380. </xsl:template>
  381.  
  382. <xsl:template match="articleinfo/copyright/holder">
  383.       <xsl:element name="text:variable-decls">
  384.                  <xsl:element name="text:variable-decl">
  385.                      <xsl:attribute name="text:value-type">
  386.                          <xsl:text>string</xsl:text>    
  387.                      </xsl:attribute>
  388.                     
  389.                   <xsl:attribute name="text:name">
  390.                       <xsl:if test="ancestor::articleinfo/copyright">
  391.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.holder_</xsl:text><xsl:value-of select="count(preceding-sibling::holder)"/>
  392.                  </xsl:if>
  393.                       </xsl:attribute>
  394.                    </xsl:element>
  395.           </xsl:element>
  396.           <xsl:element name="text:p">
  397.      <xsl:element name="text:variable-set">
  398.          <xsl:attribute name="text:value-type">
  399.                          <xsl:text>string</xsl:text>    
  400.                 </xsl:attribute>
  401.          <xsl:attribute name="text:name">
  402.              <xsl:if test="ancestor::articleinfo/copyright">
  403.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.holder_</xsl:text><xsl:value-of select="count(preceding-sibling::holder)"/>
  404.                  </xsl:if>
  405.         </xsl:attribute>
  406.         <xsl:apply-templates/>
  407.     </xsl:element>
  408.     </xsl:element>
  409. </xsl:template>
  410.  
  411.  
  412.  
  413.  
  414. <xsl:template name="affiliation">
  415.     <xsl:apply-templates/>
  416. </xsl:template>
  417.  
  418. <xsl:template match="author/affiliation/address">
  419.       <xsl:element name="text:variable-decls">
  420.                  <xsl:element name="text:variable-decl">
  421.                      <xsl:attribute name="text:value-type">
  422.                          <xsl:text>string</xsl:text>    
  423.                      </xsl:attribute>
  424.                   <xsl:attribute name="text:name">
  425.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.address_</xsl:text><xsl:value-of select="count(preceding-sibling::address)"/>
  426.                       </xsl:attribute>
  427.                    </xsl:element>
  428.           </xsl:element>
  429.           <xsl:element name="text:p">
  430.      <xsl:element name="text:variable-set">
  431.          <xsl:attribute name="text:value-type">
  432.                          <xsl:text>string</xsl:text>    
  433.                 </xsl:attribute>
  434.          <xsl:attribute name="text:name">
  435.              <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.address_</xsl:text><xsl:value-of select="count(preceding-sibling::address)"/>
  436.  
  437.         </xsl:attribute>
  438.         <xsl:apply-templates/>
  439.     </xsl:element>
  440.     </xsl:element>
  441. </xsl:template>
  442.  
  443. <xsl:template match="author/affiliation/orgname">
  444.       <xsl:element name="text:variable-decls">
  445.                  <xsl:element name="text:variable-decl">
  446.                      <xsl:attribute name="text:value-type">
  447.                          <xsl:text>string</xsl:text>    
  448.                      </xsl:attribute>
  449.                      <xsl:if test="ancestor::articleinfo">
  450.                   <xsl:attribute name="text:name">
  451.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.orgname_</xsl:text><xsl:value-of select="count(preceding-sibling::orgname)"/>
  452.                       </xsl:attribute>
  453.                   </xsl:if>
  454.                    </xsl:element>
  455.           </xsl:element>
  456.           <xsl:element name="text:p">
  457.      <xsl:element name="text:variable-set">
  458.          <xsl:attribute name="text:value-type">
  459.                          <xsl:text>string</xsl:text>    
  460.                 </xsl:attribute>
  461.                  <xsl:if test="ancestor::articleinfo">
  462.          <xsl:attribute name="text:name">
  463.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.orgname_</xsl:text><xsl:value-of select="count(preceding-sibling::orgname)"/>
  464.         </xsl:attribute>
  465.         </xsl:if>
  466.         <xsl:apply-templates/>        
  467.     </xsl:element>
  468.     </xsl:element>
  469. </xsl:template>
  470.  
  471.  
  472.  
  473. <xsl:template match="author/surname">
  474.       <xsl:element name="text:variable-decls">
  475.                  <xsl:element name="text:variable-decl">
  476.                      <xsl:attribute name="text:value-type">
  477.                          <xsl:text>string</xsl:text>    
  478.                      </xsl:attribute>
  479.                     
  480.                   <xsl:attribute name="text:name">
  481.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.surname_</xsl:text><xsl:value-of select="count(preceding-sibling::surname)"/>
  482.                       </xsl:attribute>
  483.                    </xsl:element>
  484.           </xsl:element>
  485.           <xsl:element name="text:p">
  486.      <xsl:element name="text:variable-set">
  487.         <xsl:attribute name="text:value-type">
  488.                          <xsl:text>string</xsl:text>    
  489.                 </xsl:attribute>
  490.          <xsl:attribute name="text:name">
  491.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.surname_</xsl:text><xsl:value-of select="count(preceding-sibling::surname)"/>
  492.  
  493.         
  494.         </xsl:attribute>
  495.         <xsl:apply-templates/>
  496.     </xsl:element>
  497.     </xsl:element>
  498. </xsl:template>
  499.  
  500.  
  501.  
  502.  
  503.  
  504. <xsl:template match="para">
  505.  
  506. <xsl:element name="text:p">
  507.  
  508. <xsl:choose>
  509.     <xsl:when test="ancestor-or-self::footnote">
  510.          <xsl:attribute name= "text:style-name"><xsl:text>Footnote</xsl:text></xsl:attribute>
  511.     </xsl:when>
  512.     <xsl:when test="ancestor-or-self::listitem">
  513.          <xsl:attribute name= "text:style-name"><xsl:text>VarList Item</xsl:text></xsl:attribute>
  514.     </xsl:when>
  515.     <xsl:when test="ancestor-or-self::informaltable">
  516.         <xsl:if test="ancestor-or-self::informaltable">
  517.             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  518.         </xsl:if>
  519.         <xsl:if test="ancestor-or-self::thead ">
  520.             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  521.         </xsl:if>
  522.     </xsl:when>
  523.     <xsl:when test="ancestor-or-self::table">
  524.     <xsl:if test="ancestor-or-self::table">
  525.             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  526.         </xsl:if>
  527.         <xsl:if test="ancestor-or-self::thead ">
  528.             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  529.         </xsl:if>
  530.     </xsl:when>
  531.     <xsl:otherwise>
  532.             <xsl:attribute name="text:style-name">Text body</xsl:attribute>
  533.     </xsl:otherwise>
  534. </xsl:choose>
  535.  
  536. <xsl:apply-templates/>    
  537. </xsl:element>
  538.  
  539. </xsl:template>
  540.  
  541. <xsl:template match="section">
  542.     <xsl:element name="text:h">
  543.         <xsl:attribute name="text:level"><xsl:value-of select="count(ancestor-or-self::section) "/></xsl:attribute> 
  544.         <xsl:value-of select="child::title"/> 
  545.     </xsl:element>
  546.     <xsl:apply-templates/>
  547. </xsl:template>
  548.  
  549. <xsl:template match="abstract">
  550.     <xsl:element name="text:h">
  551.         <xsl:attribute name="text:level">1</xsl:attribute> 
  552.         <xsl:text>abstract</xsl:text>
  553.     </xsl:element>
  554.     <xsl:apply-templates/>
  555. </xsl:template>
  556.  
  557.  
  558. <xsl:template match="appendix">
  559.     <xsl:element name="text:h">
  560.         <xsl:attribute name="text:level">1</xsl:attribute> 
  561.         <xsl:text>appendix</xsl:text>
  562.     </xsl:element>
  563.     <xsl:apply-templates/>
  564. </xsl:template>
  565.  
  566. <xsl:template match="sect1">
  567.     <xsl:element name="text:h">
  568.         <xsl:attribute name="text:level">1</xsl:attribute>
  569.         <xsl:value-of select="child::title"/> 
  570.     </xsl:element>
  571.     <xsl:apply-templates/>
  572. </xsl:template>
  573.  
  574. <xsl:template match="sect2">
  575.     <xsl:element name="text:h">
  576.         <xsl:attribute name="text:level">2</xsl:attribute> 
  577.             <xsl:value-of select="child::title"/> 
  578.     </xsl:element>
  579.     <xsl:apply-templates/>
  580. </xsl:template>
  581.  
  582. <xsl:template match="sect3">
  583.     <xsl:element name="text:h">
  584.         <xsl:attribute name="text:level">3</xsl:attribute> 
  585.             <xsl:value-of select="child::title"/> 
  586.     </xsl:element>
  587.     <xsl:apply-templates/>
  588. </xsl:template>
  589.  
  590. <xsl:template match="sect4">
  591.     <xsl:element name="text:h">
  592.         <xsl:attribute name="text:level">4</xsl:attribute> 
  593.             <xsl:value-of select="child::title"/> 
  594.     </xsl:element>
  595.     <xsl:apply-templates/>
  596. </xsl:template>
  597.  
  598. <xsl:template match="sect5">
  599.     <xsl:element name="text:h">
  600.         <xsl:attribute name="text:level">5</xsl:attribute> 
  601.             <xsl:value-of select="child::title"/> 
  602.     </xsl:element>
  603.     <xsl:apply-templates/>
  604. </xsl:template>
  605.  
  606. <!--<xsl:template match="sect5">
  607.     <xsl:element name="text:section">
  608.         <xsl:attribute name="text:style-name">Sect1</xsl:attribute> 
  609.         <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute>
  610.         <xsl:apply-templates/>
  611.     </xsl:element>
  612. </xsl:template>-->
  613.  
  614.  
  615. <xsl:template match="informaltable">
  616.     <xsl:element name="table:table">
  617.         <xsl:attribute name="table:name"></xsl:attribute>
  618.         <xsl:attribute name="table:style-name">Table1</xsl:attribute>
  619.         <xsl:attribute name="table:name"><xsl:value-of select="@id"/></xsl:attribute>
  620.         <xsl:apply-templates/>
  621.     </xsl:element>
  622. </xsl:template>
  623.  
  624.  
  625. <xsl:template match="table">
  626.     <xsl:variable name="tabletitle"><xsl:value-of select="title"/></xsl:variable>
  627.     <xsl:element name="table:table">
  628.         <xsl:attribute name="table:name"></xsl:attribute>
  629.         <xsl:attribute name="table:style-name">Table1</xsl:attribute>
  630.         <xsl:attribute name="table:name"><xsl:value-of select="@id"/></xsl:attribute>
  631.         <xsl:apply-templates/>
  632.     </xsl:element>
  633.     <xsl:if test="not($tabletitle='')">
  634.         <xsl:element name="text:p">
  635.             <xsl:attribute name="text:style-name">Table</xsl:attribute>
  636.                 <xsl:value-of select="$tabletitle"/>
  637.           </xsl:element>
  638.     </xsl:if>
  639. </xsl:template>
  640.  
  641. <xsl:template match="tgroup">
  642.     <xsl:element name="table:table-column">
  643.         <xsl:attribute name="table:style-name">Table1.A</xsl:attribute>
  644.         <xsl:choose>
  645.             <xsl:when test="@cols >0">
  646.                 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@cols"/></xsl:attribute>
  647.             </xsl:when>
  648.             <xsl:otherwise>
  649.                 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="count(child::tbody/row/entry) div count(child::tbody/row) "/></xsl:attribute>
  650.             </xsl:otherwise>
  651.         </xsl:choose>
  652.     </xsl:element>
  653.     <xsl:apply-templates/>
  654. </xsl:template>
  655.  
  656.  
  657. <xsl:template match="indexterm">
  658. </xsl:template>
  659.  
  660. <xsl:template match="thead">
  661.     <xsl:element name="table:table-header-rows">
  662.         <xsl:apply-templates />
  663.     </xsl:element>
  664. </xsl:template>
  665.  
  666. <xsl:template match="tbody">
  667.         <xsl:apply-templates />
  668. </xsl:template>
  669.  
  670. <xsl:template match="row">
  671.     <xsl:element name="table:table-row">
  672.         <xsl:apply-templates/>
  673.     </xsl:element>
  674. </xsl:template>
  675.  
  676. <xsl:template match="entry">
  677.     <xsl:element name="table:table-cell">
  678.         <xsl:if test="ancestor-or-self::thead">
  679.             <xsl:attribute name="table:style-name">Table1.A1</xsl:attribute>
  680.         </xsl:if>
  681.         <xsl:if test="not(ancestor-or-self::thead)">
  682.             <xsl:attribute name="table:style-name">Table1.A2</xsl:attribute>
  683.         </xsl:if>
  684.         
  685.         <xsl:choose>
  686.             <xsl:when test="@spanname">
  687.         <!--<xsl:if test="@spanname">-->
  688.                 <xsl:variable name="sname" >
  689.                     <xsl:value-of select="@spanname"/>
  690.                 </xsl:variable>
  691.                 <xsl:attribute name="table:number-columns-spanned">
  692.                     <xsl:variable name="colnamestart">
  693.                         <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@namest"/>
  694.                     </xsl:variable>
  695.                     <xsl:variable name="colnameend">
  696.                         <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@nameend"/>
  697.                     </xsl:variable>
  698.                     <xsl:variable name="colnumstart">
  699.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/>
  700.                     </xsl:variable>
  701.                     <xsl:variable name="colnumend">
  702.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/>
  703.                     </xsl:variable>
  704.                     <xsl:value-of select="$colnumend - $colnumstart + 1"/>
  705.                   </xsl:attribute >
  706.         </xsl:when>
  707.         <xsl:when  test="@namest and @nameend">
  708.         <!--<xsl:if test="@namest and @nameend">-->
  709.             <xsl:variable name="colnamestart">
  710.                     <xsl:value-of select="@namest"/>
  711.             </xsl:variable>
  712.             <xsl:variable name="colnameend">
  713.                     <xsl:value-of select="@nameend"/>
  714.             </xsl:variable>
  715.  
  716.             <xsl:attribute name="table:number-columns-spanned">
  717.             <xsl:variable name="colnumstart">
  718.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/>
  719.                     </xsl:variable>
  720.                     <xsl:variable name="colnumend">
  721.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/>
  722.                     </xsl:variable>
  723.                     <xsl:value-of select="$colnumend - $colnumstart + 1"/>
  724.  
  725.             </xsl:attribute >
  726.         </xsl:when>
  727.         </xsl:choose>
  728.         <!--
  729.         <xsl:if test="not(@namest = '' ) ">
  730.              <xsl:attribute name="table:number-columns-spanned">
  731.                  <xsl:value-of select="(substring-after(@nameend,'c')-substring-after(@namest,'c'))+1"/>
  732.                  
  733.              </xsl:attribute>
  734.         </xsl:if>
  735.         -->
  736.         <xsl:choose>
  737.             <xsl:when test="not(child::para)">
  738.                 <xsl:element name="text:p">
  739.                         <xsl:if test="ancestor-or-self::thead">
  740.                             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  741.                         </xsl:if>
  742.                         <xsl:if test="ancestor-or-self::tbody">
  743.                             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  744.                         </xsl:if>
  745.                         <xsl:apply-templates/>
  746.                 </xsl:element>
  747.             </xsl:when>
  748.             <xsl:otherwise>
  749.                 <xsl:apply-templates/>
  750.             </xsl:otherwise>
  751.         </xsl:choose>
  752.     </xsl:element>
  753. </xsl:template>
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760. <xsl:template match="figure">
  761.     <xsl:apply-templates/>
  762. </xsl:template>
  763.  
  764. <!--  lists          Section                                          -->
  765.  
  766. <xsl:template match="itemizedlist">
  767.     <xsl:element name="text:unordered-list">
  768.         <xsl:if test="not(ancestor::itemizedlist)">
  769.             <xsl:attribute name="text:style-name">L1</xsl:attribute>
  770.         </xsl:if>
  771.         <xsl:apply-templates/>
  772.     </xsl:element>
  773. </xsl:template>
  774.  
  775. <xsl:template match="variablelist">
  776.     <xsl:element name="text:unordered-list">
  777.         <xsl:attribute name="text:style-name">Var List</xsl:attribute>
  778.             <xsl:attribute name="text:continue-numbering">false</xsl:attribute>
  779.         <xsl:apply-templates />
  780.     </xsl:element>
  781. </xsl:template>
  782.  
  783. <xsl:template match="orderedlist">
  784. <xsl:element name="text:ordered-list">
  785.     <xsl:attribute name="text:style-name">Ordered List</xsl:attribute>
  786.     <xsl:attribute name="text:continue-numbering">false</xsl:attribute>
  787.     <xsl:apply-templates/>    
  788. </xsl:element>
  789. </xsl:template>
  790.  
  791. <xsl:template match="term">
  792.     <xsl:if test="parent::varlistentry">
  793.         <text:list-item>    
  794.             <xsl:element name="text:p">
  795.                 <xsl:attribute name="text:style-name">VarList Term</xsl:attribute>
  796.                 <xsl:apply-templates />
  797.             </xsl:element>
  798.         </text:list-item>
  799.     </xsl:if>
  800. </xsl:template>
  801.  
  802. <xsl:template match="listitem">
  803.     <text:list-item>
  804.         <xsl:apply-templates/>
  805.     </text:list-item>
  806. </xsl:template>
  807.  
  808. <!--  end of lists-->
  809.  
  810. <xsl:template match="menuchoice">
  811.     <xsl:apply-templates/>
  812. </xsl:template>
  813.  
  814. <xsl:template match="guimenuitem">
  815.     <xsl:element name="text:span">
  816.             <xsl:attribute name="text:style-name">GuiMenuItem</xsl:attribute>
  817.             <xsl:apply-templates/>
  818.     </xsl:element>
  819. </xsl:template>
  820.  
  821. <xsl:template match="guibutton">
  822.     <xsl:element name="text:span">
  823.             <xsl:attribute name="text:style-name">GuiButton</xsl:attribute>
  824.             <xsl:apply-templates/>
  825.     </xsl:element>
  826. </xsl:template>
  827.  
  828. <xsl:template match="guisubmenu">
  829.     <xsl:element name="text:span">
  830.             <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute>
  831.             <xsl:apply-templates/>
  832.     </xsl:element>
  833. </xsl:template>
  834.  
  835. <xsl:template match="emphasis">
  836.         <xsl:element name="text:span">
  837.             <xsl:attribute name="text:style-name">Emphasis</xsl:attribute>
  838.             <xsl:apply-templates/>
  839.     </xsl:element>
  840. </xsl:template>
  841.  
  842.  
  843. <xsl:template match="guimenu">
  844.         <xsl:element name="text:span">
  845.             <xsl:attribute name="text:style-name">GuiMenu</xsl:attribute>
  846.             <xsl:apply-templates/>
  847.     </xsl:element>
  848. </xsl:template>
  849.  
  850. <xsl:template match="guisubmenu">
  851.         <xsl:element name="text:span">
  852.             <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute>
  853.             <xsl:apply-templates/>
  854.     </xsl:element>
  855. </xsl:template>
  856.  
  857.  
  858. <xsl:template match="guilabel">
  859.     <xsl:element name="text:span">
  860.             <xsl:attribute name="text:style-name">GuiLabel</xsl:attribute>
  861.             <xsl:apply-templates/>
  862.     </xsl:element>
  863. </xsl:template>
  864.  
  865. <xsl:template match="guibutton">
  866.     <xsl:element name="text:span">
  867.             <xsl:attribute name="text:style-name">GuiButton</xsl:attribute>
  868.             <xsl:apply-templates/>
  869.     </xsl:element>
  870. </xsl:template>
  871.  
  872. <xsl:template match="keycap">
  873.     <xsl:element name="text:span">
  874.         <xsl:attribute name="text:style-name">KeyCap</xsl:attribute>
  875.         <xsl:apply-templates/>
  876.     </xsl:element>
  877. </xsl:template>
  878.  
  879.  
  880. <xsl:template match="keysym">
  881.     <xsl:element name="text:span">
  882.         <xsl:attribute name="text:style-name">KeySym</xsl:attribute>
  883.         <xsl:apply-templates/>
  884.     </xsl:element>
  885. </xsl:template>
  886.  
  887.  
  888. <xsl:template match="keycombo">
  889.     <xsl:element name="text:span">
  890.         <xsl:attribute name="text:style-name">KeyCombo</xsl:attribute>
  891.         <xsl:apply-templates/>
  892.     </xsl:element>
  893. </xsl:template>
  894.  
  895. <xsl:template match="command">
  896.     <xsl:element name="text:span">
  897.         <xsl:attribute name="text:style-name">Command</xsl:attribute>
  898.         <xsl:apply-templates/>
  899.     </xsl:element>
  900. </xsl:template>
  901.  
  902. <xsl:template match="application">
  903.     <xsl:element name="text:span">
  904.         <xsl:attribute name="text:style-name">Application</xsl:attribute>
  905.         <xsl:apply-templates/>
  906.     </xsl:element>
  907. </xsl:template>
  908.  
  909. <xsl:template match="filename">
  910.     <xsl:element name="text:span">
  911.         <xsl:attribute name="text:style-name">FileName</xsl:attribute>
  912.         <xsl:apply-templates/>
  913.     </xsl:element>
  914. </xsl:template>
  915.  
  916. <xsl:template match="systemitem">
  917.     <xsl:element name="text:span">
  918.         <xsl:attribute name="text:style-name">SystemItem</xsl:attribute>
  919.         <xsl:apply-templates/>
  920.     </xsl:element>
  921. </xsl:template>
  922.  
  923. <xsl:template match="computeroutput">
  924.     <xsl:element name="text:span">
  925.         <xsl:attribute name="text:style-name">ComputerOutput</xsl:attribute>
  926.         <xsl:apply-templates/>
  927.     </xsl:element>
  928. </xsl:template>
  929.  
  930. <xsl:template match="inlinegraphic">
  931.     <xsl:element name="draw:image">
  932.         <xsl:attribute name="draw:style-name">
  933.             <xsl:text>fr1</xsl:text>
  934.         </xsl:attribute>
  935.         <xsl:attribute name="draw:name">
  936.         </xsl:attribute>
  937.         <xsl:attribute name="text:anchor-type">
  938.         </xsl:attribute>
  939.         <xsl:attribute name="draw:z-index">
  940.         </xsl:attribute>
  941.         <xsl:attribute name="xlink:href">
  942.             <xsl:value-of select="@fileref"/>
  943.         </xsl:attribute>
  944.         <xsl:attribute name="xlink:type">
  945.         </xsl:attribute>
  946.         <xsl:attribute name="svg:width">
  947.             <!--<xsl:value-of select="@width"/>-->
  948.             <xsl:text>1cm</xsl:text>
  949.         </xsl:attribute> 
  950.         <xsl:attribute name="svg:height">    
  951.             <xsl:text>1cm</xsl:text>
  952.         </xsl:attribute>
  953.         <xsl:attribute name="xlink:show">
  954.             <xsl:text>embed</xsl:text>
  955.         </xsl:attribute>
  956.         <xsl:attribute name="xlink:actuate">
  957.             <xsl:text>onLoad</xsl:text>
  958.         </xsl:attribute>
  959.         <xsl:attribute name="draw:filter-name">
  960.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  961.         </xsl:attribute>
  962. </xsl:element>
  963. </xsl:template> 
  964.  
  965.  
  966. <xsl:template match="footnote">
  967.     <xsl:element name="text:footnote">
  968.         <!--<xsl:element name="text:footnote-citation">Aidan</xsl:element>-->
  969.         <xsl:element name="text:footnote-body">
  970.                 <xsl:apply-templates/>
  971.         </xsl:element>
  972.     </xsl:element>
  973. </xsl:template>
  974.  
  975. <xsl:template match="highlight">
  976.     <xsl:element name="text:span">
  977.         <xsl:attribute name="text:style-name">
  978.             <xsl:text>Highlight</xsl:text>
  979.         </xsl:attribute>
  980.         <xsl:apply-templates/>
  981.     </xsl:element>
  982. </xsl:template>
  983.  
  984. <xsl:template match="ulink">
  985.         <xsl:element name="text:a">
  986.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  987.         <xsl:attribute name="xlink:href">
  988.             <xsl:value-of select="@url"/>
  989.         </xsl:attribute>
  990.         <xsl:apply-templates/>
  991.     </xsl:element>
  992.  
  993. </xsl:template>
  994.  
  995. <xsl:template match="link">
  996.     <xsl:element name="text:a">
  997.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  998.         <xsl:attribute name="xlink:href">
  999.             <xsl:text>#</xsl:text>
  1000.                 <xsl:value-of select="@linkend"/>
  1001.             <xsl:text>%7Cregion</xsl:text>
  1002.         </xsl:attribute>
  1003.         <xsl:apply-templates/>
  1004.     </xsl:element>
  1005.  
  1006. </xsl:template>
  1007.  
  1008. <xsl:template match="olink">
  1009. <xsl:element name="text:a">
  1010.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  1011.         <xsl:attribute name="xlink:href">
  1012.             <xsl:value-of select="@targetdocent"/>
  1013.         </xsl:attribute>
  1014.         <xsl:apply-templates/>
  1015.     </xsl:element>
  1016. </xsl:template>
  1017.  
  1018. <xsl:template match="note">
  1019.     <office:annotation>
  1020.         <text:p>
  1021.             <xsl:apply-templates/>
  1022.         </text:p>
  1023.     </office:annotation>
  1024. </xsl:template>
  1025.  
  1026. <xsl:template match="imageobject">
  1027.     <xsl:apply-templates/>
  1028. </xsl:template>
  1029.  
  1030. <xsl:template match="textobject">
  1031. </xsl:template>
  1032.  
  1033. <xsl:template match="caption">
  1034.     <xsl:apply-templates/>
  1035. </xsl:template>
  1036.  
  1037.  
  1038. <xsl:template match="imagedata">
  1039.     <xsl:element name="draw:image">
  1040.         <xsl:attribute name="draw:style-name">
  1041.             <xsl:text>fr1</xsl:text>
  1042.         </xsl:attribute>
  1043.         <xsl:attribute name="draw:name">
  1044.         </xsl:attribute>
  1045.         <xsl:attribute name="text:anchor-type">
  1046.         </xsl:attribute>
  1047.         <xsl:attribute name="draw:z-index">
  1048.         </xsl:attribute>
  1049.         <xsl:attribute name="xlink:href">
  1050.             <xsl:value-of select="@fileref"/>
  1051.         </xsl:attribute>
  1052.         <xsl:attribute name="xlink:type">
  1053.         </xsl:attribute>
  1054.         <xsl:attribute name="svg:width">
  1055.             <!--<xsl:value-of select="@width"/>-->
  1056.             <xsl:text>1cm</xsl:text>
  1057.         </xsl:attribute> 
  1058.         <xsl:attribute name="svg:height">    
  1059.             <xsl:text>1cm</xsl:text>
  1060.         </xsl:attribute>
  1061.         <xsl:attribute name="xlink:show">
  1062.             <xsl:text>embed</xsl:text>
  1063.         </xsl:attribute>
  1064.         <xsl:attribute name="xlink:actuate">
  1065.             <xsl:text>onLoad</xsl:text>
  1066.         </xsl:attribute>
  1067.         <xsl:attribute name="draw:filter-name">
  1068.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  1069.         </xsl:attribute>
  1070.     </xsl:element>
  1071. </xsl:template>
  1072.  
  1073. <xsl:template match="audioobject">
  1074.     <xsl:element name="draw:plugin">
  1075.         <xsl:attribute name="draw:style-name">
  1076.             <xsl:text>fr1</xsl:text>
  1077.         </xsl:attribute>
  1078.         <xsl:attribute name="draw:name">
  1079.         </xsl:attribute>
  1080.         <xsl:attribute name="text:anchor-type">
  1081.         </xsl:attribute>
  1082.         <xsl:attribute name="draw:z-index">
  1083.         </xsl:attribute>
  1084.         <xsl:attribute name="xlink:href">
  1085.             <xsl:value-of select="@fileref"/>
  1086.         </xsl:attribute>
  1087.         <xsl:attribute name="xlink:type">
  1088.         </xsl:attribute>
  1089.         <xsl:attribute name="svg:width">
  1090.             <!--<xsl:value-of select="@width"/>-->
  1091.             <xsl:text>1cm</xsl:text>
  1092.         </xsl:attribute> 
  1093.         <xsl:attribute name="svg:height">    
  1094.             <xsl:text>1cm</xsl:text>
  1095.         </xsl:attribute>
  1096.         <xsl:attribute name="xlink:show">
  1097.             <xsl:text>embed</xsl:text>
  1098.         </xsl:attribute>
  1099.         <xsl:attribute name="xlink:actuate">
  1100.             <xsl:text>onLoad</xsl:text>
  1101.         </xsl:attribute>
  1102.         <xsl:attribute name="draw:filter-name">
  1103.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  1104.         </xsl:attribute>
  1105.     </xsl:element>
  1106. </xsl:template>
  1107.  
  1108. <xsl:template match="remark">
  1109.     <xsl:apply-templates/>
  1110. </xsl:template>
  1111.  
  1112. <xsl:template match="mediaobject">
  1113.     <xsl:element name="text:p">
  1114.         <xsl:attribute name="text:style-name"><xsl:text>Mediaobject</xsl:text></xsl:attribute>
  1115.     <xsl:apply-templates/>
  1116.     </xsl:element>
  1117. </xsl:template>
  1118.  
  1119. <xsl:template match="superscript">
  1120.     <xsl:element name="text:span">
  1121.         <xsl:attribute name="text:style-name">
  1122.             <xsl:text>SuperScript</xsl:text>
  1123.         </xsl:attribute>
  1124.         <xsl:apply-templates/>
  1125.     </xsl:element>
  1126. </xsl:template>
  1127.  
  1128. <xsl:template match="subscript">
  1129.     <xsl:element name="text:span">
  1130.         <xsl:attribute name="text:style-name">
  1131.             <xsl:text>SubScript</xsl:text>
  1132.         </xsl:attribute>
  1133.         <xsl:apply-templates/>
  1134.     </xsl:element>
  1135. </xsl:template>
  1136.  
  1137.  
  1138.  
  1139. </xsl:stylesheet>
  1140.