home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 March / PCWorld_2003-03_cd.bin / Software / Vyzkuste / openoffice / f_0175 / main_transform.xsl
Extensible Markup Language  |  2002-02-07  |  44KB  |  1,099 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!--
  4.    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5.    | This is the transformation style sheet for Help files            |
  6.    | (main_tranform.xsl).                                             |
  7.    | (c) 2001 by Sun Microsystems, Inc. All Rights Reserved           |
  8.    | FPE                                                              |
  9.    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  10.    | You should not edit this file unless you know what you're doing! |
  11.    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12.    | Revision History                                                 |
  13.    | ================                                                 |
  14.    |                                                                  |
  15.    |  27-Jul-01: Evaluation of $Program replaced by declaration       |
  16.    |             of $Prog for the same purpose                        |
  17.    |  09-Aug-01: Added evaluation of th in "How to get"-popups.       | 
  18.    |             Changed evaluation of icon/name tables within that.  |
  19.    |  09-Aug-01: Added special formatting of "Related" header         |
  20.    |             (styleclass "reltop")                                |
  21.    |  09-Aug-01: Added variable for column width of first columns of  |
  22.    |             tables with icons                                    |
  23.    |  14-Aug-01: Fixed Bug: Switches were not evaluated in document   |
  24.    |             title h1                                             |
  25.    |  14-Aug-01: Fixed Bug: System switches were falsely evaluated.   |
  26.    |             Changed the way of switch evaluation, now using modes|
  27.    |  17-AUG-01: Fixed Bug: switch as direct child of embedded were   |
  28.    |             not evaluated                                        |
  29.    |  22-Aug-01: Fixed: Axis PRECEDING no longer used (wasn't         |
  30.    |             supported by processor)                              |
  31.    |  22-Aug-01: Now empty Howtoget links are ignored                 |
  32.    |  27-Aug-01: Now the image size is evaluated (from cm to pixels)  |
  33.    |             and included in the img tags.                        |
  34.    |  28-Aug-01: Embedded Paras now check for a <p> ancestor          |
  35.    |             instead of a parent.                                 |
  36.    |  30-Aug-01: Added recursive evaluation of embedded text          |
  37.    |  02-Oct-01: ABI: Added parameter cs for use in css url           |
  38.    |  10-Oct-01: Added handling for text:tab-stop and text:s          |
  39.    |  10-Oct-01: Added handling for source file admin information     |
  40.    |  15-Oct-01: Fixed Bug: fix URL vnd.sun.star.help for internal URL| 
  41.    |             calls (embedded + popup-cut), $sm for external calls |
  42.    |  19-Oct-01: Added handling of product variable parameters        |
  43.    |  25-Oct-01: Removed insertion of hr before h2                    |
  44.    |  25-Oct-01: Added language handling                              |
  45.    |  15-Nov-01: Fixed Bug: embedded productname tags were not        |
  46.    |             replaced                                             |
  47.    |  15-Nov-01: Fixed Bug: embedde ol/ul were not evaluated due      |
  48.    |             to a typo                                            |
  49.    |  10-Dec-01: Changed transcription of "Head"s. Now they are       |
  50.    |             transformed to <h>s                                  |
  51.    |  10-Dec-01: Added OOo-switch for Product                         |
  52.    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  53. //-->
  54.  
  55. <xsl:stylesheet version="1.0" 
  56.   xmlns:nu="http://www.jclark.com/xt/java/com.sun.xmlsearch.tree.NodeUtils" 
  57.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  58.   xmlns:office="http://openoffice.org/2000/office" 
  59.   xmlns:style="http://openoffice.org/2000/style"  
  60.   xmlns:text="http://openoffice.org/2000/text"  
  61.   xmlns:table="http://openoffice.org/2000/table"  
  62.   xmlns:draw="http://openoffice.org/2000/drawing" 
  63.   xmlns:fo="http://www.w3.org/1999/XSL/Format"  
  64.   xmlns:xlink="http://www.w3.org/1999/xlink" 
  65.   xmlns:dc="http://purl.org/dc/elements/1.1/"   
  66.   xmlns:meta="http://openoffice.org/2000/meta" 
  67.   xmlns:number="http://openoffice.org/2000/datastyle" 
  68.   xmlns:svg="http://www.w3.org/2000/svg" 
  69.   xmlns:chart="http://openoffice.org/2000/chart" 
  70.   xmlns:help="http://openoffice.org/2000/help">
  71.   
  72.   <!-- Generate html code -->
  73.   <xsl:output method="html"/>
  74.   
  75.   <!-- 
  76.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  77.   | STYLESHEET PARAMETER DEFINITION                                  |
  78.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  79.   | These are used to define the parameters handed over to the       |
  80.   | stylesheet processor. They are used to build the help URLs       |
  81.   | and for application and product/name evaluation.                 |
  82.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  83.   -->
  84.  
  85.     <!-- Unused parameter of mysterious origin ?-->
  86.   <xsl:param name="Device" select="'WARP'"/>
  87.   
  88.   <!-- Parameters used to construct the URL prefix -->
  89.   <xsl:param name="hp" select="''"/>
  90.   <xsl:param name="sm" select="'vnd.sun.star.help://'"/>
  91.   <xsl:param name="qm" select="'?'"/>
  92.   <xsl:param name="es" select="'='"/>
  93.   <xsl:param name="am" select="'&'"/>
  94.   <xsl:param name="cl" select="':'"/>
  95.   <xsl:param name="sl" select="'/'"/>
  96.   <xsl:param name="hm" select="'#'"/>
  97.   <xsl:param name="cs" select="''"/>
  98.   
  99.   <!-- Parameter used to identify the current application database -->
  100.   <xsl:param name="Database" select="'swriter'"/>
  101.  
  102.   <!-- Parameter used to identify the current language -->
  103.   <xsl:param name="Language" select="'de'"/>
  104.   
  105.   <!-- Parameter to identify the OS/platform used -->
  106.   <xsl:param name="System" select="'WIN'"/>
  107.  
  108.     <!-- Parameters used to output help error information -->
  109.   <xsl:param name="Id" select="'0000'"/>
  110.   <xsl:param name="Path" select="'Path'"/>
  111.  
  112.     <!-- Parameters used to assign product names -->
  113.   <xsl:param name="productname" select="'Office'"/>
  114.   <xsl:param name="productversion" select="''"/>
  115.   <xsl:param name="vendorname" select="'Webtop'"/>
  116.   <xsl:param name="vendorversion" select="''"/>
  117.   <xsl:param name="vendorshort" select="'Webtop'"/>
  118.   
  119.   <!-- 
  120.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  121.   | STYLESHEET VARIABLE DEFINITION                                   |
  122.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  123.   | These are used for repeated tasks in this stylesheet and only    |
  124.   | defined once here.                                               |
  125.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  126.   -->
  127.  
  128.   <!-- 
  129.         Variable to identify the application used for evaluation of program switches
  130.         This one is derived from the database name    
  131.     -->
  132.   <xsl:variable name="Program">
  133.     <xsl:choose>
  134.       <xsl:when test="$Database='swriter'">WRITER</xsl:when>
  135.       <xsl:when test="$Database='scalc'">CALC</xsl:when>
  136.       <xsl:when test="$Database='sdraw'">DRAW</xsl:when>
  137.       <xsl:when test="$Database='simpress'">IMPRESS</xsl:when>
  138.       <xsl:when test="$Database='sbasic'">BASIC</xsl:when>
  139.       <xsl:when test="$Database='smath'">MATH</xsl:when>
  140.       <xsl:when test="$Database='schart'">CHART</xsl:when>
  141.       <xsl:when test="$Database='portal'">PORTAL</xsl:when>
  142.       <xsl:otherwise>NONE</xsl:otherwise>
  143.     </xsl:choose>
  144.   </xsl:variable>
  145.   
  146.     <!-- 
  147.         Variable to define the language of the help document which may be different
  148.         from the one defined in the Language *parameter*! It is evaluated from a
  149.         meta tag in the xml source
  150.     -->
  151.   <xsl:variable name="lang">
  152.     <xsl:for-each select="/html/head/meta">
  153.       <xsl:if test="@name='language'">
  154.         <xsl:value-of select="@content"/>
  155.       </xsl:if>
  156.     </xsl:for-each>
  157.   </xsl:variable>
  158.   
  159.     <!-- Variables for formatting purposes. "onepixel" is the image number of a transparent 1-pixel image -->
  160.   <xsl:variable name="colwidth_1">25</xsl:variable>
  161.   <xsl:variable name="spacewidth">5</xsl:variable>
  162.   <xsl:variable name="tabwidth">15</xsl:variable>
  163.   <xsl:variable name="onepixel">67433</xsl:variable>
  164.  
  165.     <!-- Variable for distinguishing the Open Source distribution -->
  166.   <xsl:variable name="Prod">
  167.     <xsl:choose>
  168.       <xsl:when test="$productname='StarOffice'">Commercial</xsl:when>
  169.       <xsl:when test="$productname='StarSuite'">Commercial</xsl:when>
  170.       <xsl:otherwise>OpenSource</xsl:otherwise>
  171.     </xsl:choose>
  172.   </xsl:variable>
  173.  
  174.   <!-- 
  175.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  176.   | BASIC PROCESSING OF ELEMENTS                                     |
  177.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  178.   -->
  179.  
  180.   <!-- Copy through of all elements including their attributes -->
  181.   <xsl:template match="*|@*|comment()|processing-instruction()|text()">
  182.     <xsl:copy>
  183.       <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
  184.     </xsl:copy>
  185.   </xsl:template>
  186.  
  187.   <xsl:template match="help:*">
  188.     <xsl:element name="{name()}">
  189.       <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
  190.     </xsl:element>
  191.   </xsl:template>
  192.  
  193.   <!-- The language of the document body is set here as an attribute of the body tag -->
  194.   <xsl:template match="body">
  195.     <xsl:element name="body">
  196.       <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
  197.       <xsl:apply-templates/>
  198.     </xsl:element>
  199.   </xsl:template>
  200.  
  201.  
  202.   <!-- 
  203.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  204.   | PROCESSING OF SPECIFIC HELP ELEMENTS                             |
  205.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  206.   -->
  207.  
  208.   <xsl:template match="help:help-id|help:to-be-embedded">
  209.     <xsl:apply-templates/>
  210.   </xsl:template>
  211.   
  212.     <xsl:template match="help:to-popup">
  213.     <xsl:apply-templates/>
  214.   </xsl:template>
  215.   
  216.     <!-- Text for active help must only show in the content if set to visible -->
  217.   <xsl:template match="help:help-text">
  218.     <xsl:if test="@value='visible'">
  219.       <xsl:apply-templates/>
  220.     </xsl:if>
  221.   </xsl:template>
  222.  
  223.   <!-- 
  224.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  225.   | CONDITIONAL PROCESSING                                           |
  226.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  227.     | There are program, system and product switches throughout the    |
  228.     | help enabling or disabling content depending on their context    |
  229.     | which is described using the parameters/variables defined above. |
  230.     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  231.   -->
  232.  
  233.     <!-- Switches inside normal text -->
  234.   <xsl:template match="help:switch">
  235.     <xsl:choose>
  236.       <xsl:when test="@select='Program'">
  237.         <xsl:apply-templates mode="switch_prog"/>
  238.       </xsl:when>
  239.       <xsl:when test="@select='System'">
  240.         <xsl:apply-templates mode="switch_sys"/>
  241.       </xsl:when>
  242.       <xsl:when test="@select='Product'">
  243.         <xsl:apply-templates mode="switch_prod"/>
  244.       </xsl:when>
  245.     </xsl:choose>
  246.   </xsl:template>
  247.  
  248.  
  249.     <!-- Switches inside text which is embedded from elsewhere -->
  250.   <xsl:template match="help:switch" mode="embedded">
  251.     <xsl:choose>
  252.       <xsl:when test="@select='Program'">
  253.         <xsl:apply-templates mode="switch_prog"/>
  254.       </xsl:when>
  255.       <xsl:when test="@select='System'">
  256.         <xsl:apply-templates mode="switch_sys"/>
  257.       </xsl:when>
  258.       <xsl:when test="@select='Product'">
  259.         <xsl:apply-templates mode="switch_prod"/>
  260.       </xsl:when>
  261.     </xsl:choose>
  262.   </xsl:template>
  263.  
  264.     
  265.   <xsl:template match="help:case" mode="switch_prog">
  266.     <xsl:if test="@select=$Program">
  267.       <xsl:apply-templates/>
  268.     </xsl:if>
  269.   </xsl:template>
  270.  
  271.     <xsl:template match="help:default" mode="switch_prog">
  272.     <xsl:if test="not(../help:case[@select=$Program])">
  273.       <xsl:apply-templates/>
  274.     </xsl:if>
  275.   </xsl:template>
  276.  
  277.   <xsl:template match="help:case" mode="switch_sys">
  278.     <xsl:if test="@select=$System">
  279.       <xsl:apply-templates/>
  280.     </xsl:if>
  281.   </xsl:template>
  282.  
  283.   <xsl:template match="help:default" mode="switch_sys">
  284.     <xsl:if test="not(../help:case[@select=$System])">
  285.       <xsl:apply-templates/>
  286.     </xsl:if>
  287.   </xsl:template>
  288.  
  289.   <xsl:template match="help:case" mode="switch_prod">
  290.     <xsl:if test="@select=$Prod">
  291.       <xsl:apply-templates/>
  292.     </xsl:if>
  293.   </xsl:template>
  294.  
  295.   <xsl:template match="help:default" mode="switch_prod">
  296.     <xsl:if test="not(../help:case[@select=$Prod])">
  297.       <xsl:apply-templates/>
  298.     </xsl:if>
  299.   </xsl:template>
  300.  
  301.     <!-- Switches inside the document title -->
  302.   <xsl:template match="help:switch" mode="doctitle">
  303.     <xsl:if test="@select='Program' or @select='System'">
  304.       <xsl:apply-templates mode="doctitle"/>
  305.     </xsl:if>
  306.   </xsl:template>
  307.   <xsl:template match="help:case" mode="doctitle">
  308.     <xsl:if test="@select=$Program or @select=$System">
  309.       <xsl:apply-templates mode="doctitle"/>
  310.     </xsl:if>
  311.   </xsl:template>
  312.   <xsl:template match="help:default" mode="doctitle">
  313.     <xsl:if test="../../help:switch[@select='System'] and not(../help:case[@select=$System])">
  314.       <xsl:apply-templates mode="doctitle"/>
  315.     </xsl:if>
  316.     <xsl:if test="../../help:switch[@select='Program'] and not(../help:case[@select=$Program])">
  317.       <xsl:apply-templates mode="doctitle"/>
  318.     </xsl:if>
  319.   </xsl:template>
  320.  
  321.   <!-- 
  322.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  323.   | PROCESSING OF PARAGRAPHS AND HEADINGS                            |
  324.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  325.   | This one is quite cascaded to take account of the different para |
  326.   | contexts. This includes headers as in the xml source files these |
  327.   | are only paragraphs with a special style class, viz "Head"       |
  328.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  329.   -->
  330.  
  331.     <!-- Normal Paragraphs --> 
  332.   <xsl:template match="p">
  333.  
  334.     <!-- Disregard empty paragraphs -->
  335.     <xsl:choose>
  336.       <xsl:when test=".='' and count(child::*)=0"/>
  337.       <xsl:otherwise>
  338.  
  339.         <!-- Process all headings -->
  340.         <xsl:choose>
  341.           <xsl:when test="substring(@class,1,4)='Head'">
  342.  
  343.             <!-- Head 1 should only be the document title at the top and is treated differently -->
  344.             <xsl:choose>
  345.               <xsl:when test="@class='Head1'">
  346.                 <xsl:element name="table">
  347.                   <xsl:attribute name="width">100%</xsl:attribute>
  348.                   <xsl:attribute name="border">0</xsl:attribute>
  349.                   <xsl:attribute name="cellspacing">1</xsl:attribute>
  350.                   <xsl:attribute name="cellpadding">3</xsl:attribute>
  351.                   <xsl:attribute name="class">doctablebg</xsl:attribute>
  352.                   <xsl:element name="tr">
  353.                     <xsl:attribute name="class">doctitlebg</xsl:attribute>
  354.                     <xsl:element name="td">
  355.                       <xsl:element name="h1">
  356.                         <xsl:apply-templates mode="doctitle"/>
  357.                       </xsl:element>
  358.                     </xsl:element>
  359.                   </xsl:element>
  360.                 </xsl:element>
  361.                 <xsl:element name="br"/>
  362.               </xsl:when>
  363.  
  364.                         <!-- All other Heads are converted to HTML headings -->
  365.               <xsl:when test="@class='Head2'">
  366.                 <xsl:element name="h2">
  367.                   <xsl:apply-templates/>
  368.                 </xsl:element>
  369.               </xsl:when>
  370.  
  371.               <xsl:when test="@class='Head3'">
  372.                 <xsl:element name="h3">
  373.                   <xsl:apply-templates/>
  374.                 </xsl:element>
  375.               </xsl:when>
  376.  
  377.               <xsl:when test="@class='Head4'">
  378.                 <xsl:element name="h4">
  379.                   <xsl:apply-templates/>
  380.                 </xsl:element>
  381.               </xsl:when>
  382.  
  383.               <xsl:when test="@class='Head5'">
  384.                 <xsl:element name="h5">
  385.                   <xsl:apply-templates/>
  386.                 </xsl:element>
  387.               </xsl:when>
  388.  
  389.               <xsl:when test="@class='Head6'">
  390.                 <xsl:element name="h6">
  391.                   <xsl:apply-templates/>
  392.                 </xsl:element>
  393.               </xsl:when>
  394.  
  395.             </xsl:choose>
  396.  
  397.           </xsl:when>
  398.           
  399.                 <!-- 
  400.             All Non-Header paragraphs are converted into HTML p with corresponding style class assigned.
  401.             Valid style classes are Paragraph, ParaList, TextInTable, TableHead, PropText
  402.           -->
  403.  
  404.           <xsl:when test="@class='Paragraph' 
  405.                        or @class='ParaList' 
  406.                        or @class='TextInTable' 
  407.                        or @class='TableHead' 
  408.                        or @class='PropText'">
  409.             <xsl:element name="p">
  410.               <xsl:choose>
  411.                 <!-- By special request, turn the "Related Topics" header into an own style class -->
  412.                 <xsl:when test="child::help:embedded[@Eid='related']">
  413.                   <xsl:attribute name="class">reltop</xsl:attribute>
  414.                 </xsl:when>
  415.                 <xsl:otherwise>
  416.                   <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
  417.                 </xsl:otherwise>
  418.                 </xsl:choose>
  419.               <xsl:apply-templates/>
  420.             </xsl:element>
  421.           </xsl:when>
  422.  
  423.           <!-- all unknown paragraph styles are just converted into the standard "paragraph" style -->
  424.           <xsl:otherwise>
  425.             <xsl:element name="p">
  426.               <xsl:attribute name="class">Paragraph</xsl:attribute>
  427.               <xsl:apply-templates/>
  428.             </xsl:element>
  429.           </xsl:otherwise>
  430.  
  431.         </xsl:choose>
  432.  
  433.       </xsl:otherwise> <!-- non-empty paras-->
  434.     </xsl:choose>
  435.   </xsl:template>
  436.  
  437.   <!-- Paragraphs inside text which is embedded from somewhere else -->
  438.   <xsl:template match="p" mode="embedded">
  439.   
  440.     <!-- Disregard empty paragraphs -->
  441.     <xsl:choose>
  442.       <xsl:when test=".='' and count(child::*)=0"/>
  443.       <xsl:otherwise>
  444.         <xsl:choose>
  445.           
  446.           <xsl:when test="@class='Head1'">
  447.             <xsl:element name="h2">
  448.               <xsl:apply-templates/>
  449.             </xsl:element>
  450.           </xsl:when>
  451.           
  452.           <xsl:when test="@class='Head2'">
  453.             <xsl:element name="h2">
  454.               <xsl:apply-templates/>
  455.             </xsl:element>
  456.           </xsl:when>
  457.       
  458.           <xsl:when test="@class='Head3'">
  459.             <xsl:element name="h3">
  460.               <xsl:apply-templates/>
  461.             </xsl:element>
  462.           </xsl:when>
  463.           
  464.           <xsl:when test="@class='Head4'">
  465.             <xsl:element name="h4">
  466.               <xsl:apply-templates/>
  467.             </xsl:element>
  468.           </xsl:when>
  469.           
  470.           <xsl:when test="@class='Head5'">
  471.             <xsl:element name="h5">
  472.               <xsl:apply-templates/>
  473.             </xsl:element>
  474.           </xsl:when>
  475.           
  476.           <xsl:when test="@class='Head6'">
  477.             <xsl:element name="h6">
  478.               <xsl:apply-templates/>
  479.             </xsl:element>
  480.           </xsl:when>
  481.       
  482.               <!-- 
  483.             All Non-Header paragraphs are converted into HTML p with corresponding style class assigned.
  484.             Valid style classes are Paragraph, ParaList, TextInTable, TableHead, PropText
  485.           -->
  486.           
  487.           <xsl:when test="@class='Paragraph' 
  488.                        or @class='ParaList' 
  489.                        or @class='TextInTable' 
  490.                        or @class='TableHead' 
  491.                        or @class='PropText'">
  492.             <xsl:element name="p">
  493.               <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
  494.               <xsl:apply-templates/>
  495.             </xsl:element>
  496.           </xsl:when>
  497.         
  498.           <!-- all unknown paragraph styles are just converted into the standard "paragraph" style -->
  499.           <xsl:otherwise>
  500.             <xsl:element name="p">
  501.               <xsl:attribute name="class">Paragraph</xsl:attribute>
  502.               <xsl:apply-templates/>
  503.             </xsl:element>
  504.           </xsl:otherwise>
  505.     
  506.         </xsl:choose>
  507.       </xsl:otherwise> <!-- non-empty paragraphs -->
  508.     </xsl:choose>
  509.   </xsl:template>
  510.  
  511.   <!-- Paragraphs inside popup text (mainly the information of how to get a function) -->
  512.   <xsl:template match="p" mode="popup">
  513.     <xsl:if test="(. != '') or (count(child::*)>0)">
  514.       <xsl:element name="p">
  515.         <xsl:attribute name="class">howtogetpara</xsl:attribute>
  516.         <xsl:apply-templates/>
  517.       </xsl:element>
  518.     </xsl:if>
  519.   </xsl:template>
  520.  
  521.   <!-- 
  522.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  523.   | PROCESSING OF LISTS                                              |
  524.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  525.   -->
  526.  
  527.   <!-- Numbered lists in normal text -->
  528.   <xsl:template match="ol">
  529.     <xsl:element name="ol">
  530.       <xsl:apply-templates/>
  531.     </xsl:element>
  532.   </xsl:template>
  533.   
  534.   <!-- Numbered lists in text embedded from somewhere else -->
  535.   <xsl:template match="ol" mode="embedded">
  536.     <xsl:element name="ol">
  537.       <xsl:apply-templates/>
  538.     </xsl:element>
  539.   </xsl:template>
  540.   
  541.   <!-- Bulleted lists in normal text -->
  542.   <xsl:template match="ul">
  543.     <xsl:element name="ul">
  544.       <xsl:apply-templates/>
  545.     </xsl:element>
  546.   </xsl:template>
  547.   
  548.   <!-- Bulleted lists in text embedded from somewhere else -->
  549.   <xsl:template match="ul" mode="embedded">
  550.     <xsl:element name="ul">
  551.       <xsl:apply-templates/>
  552.     </xsl:element>
  553.   </xsl:template>
  554.   
  555.   <!-- List items in any context -->
  556.   <xsl:template match="li">
  557.     <xsl:element name="li">
  558.       <xsl:apply-templates/>
  559.     </xsl:element>
  560.   </xsl:template>
  561.   
  562.   
  563.   <!-- 
  564.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  565.   | PROCESSING OF CHARACTER CLASSES                                  |
  566.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  567.   -->
  568.   
  569.   <!-- Process character formatting -->
  570.   <xsl:template match="span">
  571.     <!-- Disregard spans with table automatic formats, starting with "Tabelle" -->
  572.     <xsl:choose>
  573.       <xsl:when test="substring(@class,1,7)='Tabelle'">
  574.         <xsl:apply-templates/>
  575.       </xsl:when>
  576.       <xsl:otherwise>
  577.         <!-- insert emphasized span -->
  578.         <xsl:element name="span">
  579.           <xsl:attribute name="class">emph</xsl:attribute>
  580.           <xsl:apply-templates/>
  581.         </xsl:element>
  582.       </xsl:otherwise>
  583.     </xsl:choose>
  584.   </xsl:template>
  585.   <xsl:template match="span" mode="embedded">
  586.     <!-- Disregard spans with table automatic formats, starting with "Tabelle" -->
  587.     <xsl:choose>
  588.       <xsl:when test="substring(@class,1,7)='Tabelle'">
  589.         <xsl:apply-templates/>
  590.       </xsl:when>
  591.       <xsl:otherwise>
  592.         <!-- insert emphasized span -->
  593.         <xsl:element name="span">
  594.           <xsl:attribute name="class">emph</xsl:attribute>
  595.           <xsl:apply-templates/>
  596.         </xsl:element>
  597.       </xsl:otherwise>
  598.     </xsl:choose>
  599.   </xsl:template>
  600.   <xsl:template match="span" mode="popup">
  601.     <!-- Disregard spans with table automatic formats, starting with "Tabelle" -->
  602.     <xsl:choose>
  603.       <xsl:when test="substring(@class,1,7)='Tabelle'">
  604.         <xsl:apply-templates/>
  605.       </xsl:when>
  606.       <xsl:otherwise>
  607.         <!-- insert emphasized span -->
  608.         <xsl:element name="span">
  609.           <xsl:attribute name="class">emph</xsl:attribute>
  610.           <xsl:apply-templates/>
  611.         </xsl:element>
  612.       </xsl:otherwise>
  613.     </xsl:choose>
  614.   </xsl:template>
  615.   
  616.   <!-- 
  617.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  618.   | PROCESSING OF TABLES                                             |
  619.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  620.   -->
  621.   
  622.   <!-- Tables should be preceded and followed by a line break -->
  623.   <xsl:template match="table">
  624.     <xsl:element name="br"/>
  625.     <xsl:element name="table">
  626.       <xsl:if test="@border>0">
  627.         <xsl:attribute name="border">1</xsl:attribute>
  628.         <xsl:attribute name="class">tablebg</xsl:attribute>
  629.       </xsl:if>
  630.       <xsl:attribute name="cellspacing">0</xsl:attribute>
  631.       <xsl:attribute name="cellpadding">2</xsl:attribute>
  632.       <xsl:apply-templates/>
  633.     </xsl:element>
  634.     <xsl:element name="br"/>
  635.   </xsl:template>
  636.   <xsl:template match="table" mode="embedded">
  637.     <xsl:element name="br"/>
  638.     <xsl:element name="table">
  639.       <xsl:if test="@border>0">
  640.         <xsl:attribute name="border">1</xsl:attribute>
  641.         <xsl:attribute name="class">tablebg</xsl:attribute>
  642.       </xsl:if>
  643.       <xsl:attribute name="cellspacing">0</xsl:attribute>
  644.       <xsl:attribute name="cellpadding">2</xsl:attribute>
  645.       <xsl:apply-templates/>
  646.     </xsl:element>
  647.     <xsl:element name="br"/>
  648.   </xsl:template>
  649.   <xsl:template match="table" mode="popup">
  650.     <xsl:element name="table">
  651.       <xsl:attribute name="border">0</xsl:attribute>
  652.       <xsl:attribute name="cellspacing">0</xsl:attribute>
  653.       <xsl:attribute name="cellpadding">2</xsl:attribute>
  654.       <xsl:apply-templates mode="popup"/>
  655.     </xsl:element>
  656.   </xsl:template>
  657.   <xsl:template match="tr">
  658.     <xsl:element name="tr">
  659.       <xsl:apply-templates/>
  660.     </xsl:element>
  661.   </xsl:template>
  662.   <xsl:template match="tr" mode="popup">
  663.     <xsl:element name="tr">
  664.       <xsl:apply-templates mode="popup"/>
  665.     </xsl:element>
  666.   </xsl:template>
  667.   <xsl:template match="th">
  668.     <!-- no th for borderless tables - 24/07/01-->
  669.     <xsl:choose>
  670.       <xsl:when test="../../table[@border>0]">
  671.         <xsl:element name="th">
  672.           <xsl:attribute name="align">left</xsl:attribute>
  673.           <xsl:attribute name="valign">top</xsl:attribute>
  674.           <xsl:attribute name="class">tableheadbg</xsl:attribute>
  675.           <xsl:apply-templates/>
  676.         </xsl:element>
  677.       </xsl:when>
  678.       <xsl:otherwise>
  679.         <xsl:element name="td">
  680.           <xsl:attribute name="align">left</xsl:attribute>
  681.           <xsl:attribute name="valign">top</xsl:attribute>
  682.           <xsl:attribute name="class">tabledatabg</xsl:attribute>
  683.           <xsl:apply-templates/>
  684.         </xsl:element>
  685.       </xsl:otherwise>
  686.     </xsl:choose>
  687.   </xsl:template>
  688.   <xsl:template match="td" mode="popup">
  689.     <xsl:element name="td">
  690.       <xsl:if test="descendant::draw:image">
  691.         <xsl:attribute name="width"><xsl:value-of select="$colwidth_1"/></xsl:attribute>
  692.       </xsl:if>
  693.       <xsl:apply-templates mode="popup"/>
  694.     </xsl:element>
  695.   </xsl:template>
  696.   <xsl:template match="th" mode="popup">
  697.     <xsl:element name="td">
  698.       <xsl:if test="descendant::draw:image">
  699.         <xsl:attribute name="width"><xsl:value-of select="$colwidth_1"/></xsl:attribute>
  700.       </xsl:if>
  701.       <xsl:apply-templates mode="popup"/>
  702.     </xsl:element>
  703.   </xsl:template>
  704.   <xsl:template match="td">
  705.     <xsl:element name="td">
  706.       <xsl:attribute name="align">left</xsl:attribute>
  707.       <xsl:attribute name="valign">top</xsl:attribute>
  708.       <xsl:attribute name="class">tabledatabg</xsl:attribute>
  709.       <xsl:apply-templates/>
  710.     </xsl:element>
  711.   </xsl:template>
  712.   
  713.   <!-- 
  714.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  715.   | PROCESSING OF TEXT EMBEDDED FROM SOMEHWERE ELSE                  |
  716.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  717.   -->
  718.   
  719.   
  720.   <!-- Process embedded help text -->
  721.   <xsl:template match="help:embedded">
  722.     <xsl:variable name="Link" select="concat('vnd.sun.star.help://',$Database,'/',@Id,'?Language=',$Language,'&System=',$System)"/>
  723.     <xsl:variable name="EmbeddedDoc" select="document($Link)"/>
  724.     <xsl:variable name="Docpart" select="@Eid"/>
  725.     <xsl:choose>
  726.       <!-- prevent embedded paragraphs without p tag -->
  727.       <xsl:when test="not(ancestor::p)">
  728.         <xsl:element name="p">
  729.           <xsl:attribute name="class">Paragraph</xsl:attribute>
  730.           <xsl:apply-templates select="$EmbeddedDoc//help:to-be-embedded[@Eid=$Docpart]" mode="embedded"/>
  731.         </xsl:element>
  732.       </xsl:when>
  733.       <xsl:otherwise>
  734.         <xsl:apply-templates select="$EmbeddedDoc//help:to-be-embedded[@Eid=$Docpart]" mode="embedded"/>
  735.       </xsl:otherwise>
  736.     </xsl:choose>
  737.   </xsl:template>
  738.   <!-- Process embedded help text -->
  739.   <xsl:template match="help:embedded" mode="embedded">
  740.     <xsl:variable name="Link" select="concat($sm,$Database,'/',@Id,'?Language=',$Language,'&System=',$System)"/>
  741.     <xsl:variable name="EmbeddedDoc" select="document($Link)"/>
  742.     <xsl:variable name="Docpart" select="@Eid"/>
  743.     <xsl:choose>
  744.       <!-- prevent embedded paragraphs without p tag -->
  745.       <xsl:when test="not(ancestor::p)">
  746.         <xsl:element name="p">
  747.           <xsl:attribute name="class">Paragraph</xsl:attribute>
  748.           <xsl:apply-templates select="$EmbeddedDoc//help:to-be-embedded[@Eid=$Docpart]" mode="embedded"/>
  749.         </xsl:element>
  750.       </xsl:when>
  751.       <xsl:otherwise>
  752.         <xsl:apply-templates select="$EmbeddedDoc//help:to-be-embedded[@Eid=$Docpart]" mode="embedded"/>
  753.       </xsl:otherwise>
  754.     </xsl:choose>
  755.   </xsl:template>
  756.   
  757.   <!-- 
  758.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  759.   | PROCESSING OF POPUP TEXT                                         |
  760.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  761.   -->
  762.   
  763.   <!-- Process Popup help text -->
  764.   <xsl:template match="help:popup-cut">
  765.     <xsl:variable name="ref" select="concat('vnd.sun.star.help://',$Database,'/',@Id,'?Language=',$Language,'&System=',$System)"/>
  766.     <xsl:variable name="popupdoc" select="document($ref)"/>
  767.     <xsl:variable name="part" select="@Eid"/>
  768.     <xsl:apply-templates select="$popupdoc//help:to-popup[@Eid=$part]"/>
  769.     <!--
  770.         <xsl:element name="hr">
  771.           <xsl:attribute name="width">50%</xsl:attribute>
  772.           <xsl:attribute name="align">center</xsl:attribute>
  773.           <xsl:attribute name="size">1</xsl:attribute>
  774.         </xsl:element>
  775. //-->
  776.   </xsl:template>
  777.   
  778.   <!-- Process help popups -->
  779.   <!-- Workaround for "How to get this function" popup is to load it in a small table into the document -->
  780.   <xsl:template match="help:popup">
  781.     <xsl:choose>
  782.       <xsl:when test="child::help:embedded[@Eid='wie']">
  783.         <xsl:variable name="Link" select="concat('vnd.sun.star.help://',$Database,'/',@Id,'?Language=',$Language,'&System=',$System)"/>
  784.         <xsl:variable name="EmbeddedDoc" select="document($Link)"/>
  785.         <xsl:variable name="Docpart" select="@Eid"/>
  786.         <xsl:if test="$EmbeddedDoc//help:to-popup[@Eid=$Docpart]!=''">
  787.           <xsl:element name="table">
  788.             <xsl:attribute name="width">100%</xsl:attribute>
  789.             <xsl:attribute name="border">0</xsl:attribute>
  790.             <xsl:attribute name="cellspacing">0</xsl:attribute>
  791.             <xsl:attribute name="cellpadding">4</xsl:attribute>
  792.             <xsl:element name="tr">
  793.               <xsl:element name="td">
  794.                 <xsl:attribute name="class">howtogetheader</xsl:attribute>
  795.                 <xsl:value-of select="."/>
  796.                 <xsl:apply-templates/>
  797.               </xsl:element>
  798.             </xsl:element>
  799.             <xsl:element name="tr">
  800.               <xsl:element name="td">
  801.                 <xsl:attribute name="class">howtogetbody</xsl:attribute>
  802.                 <xsl:apply-templates select="$EmbeddedDoc//help:to-popup[@Eid=$Docpart]" mode="popup"/>
  803.               </xsl:element>
  804.             </xsl:element>
  805.           </xsl:element>
  806.         </xsl:if>
  807.         <xsl:element name="br"/>
  808.       </xsl:when>
  809.       <xsl:otherwise>
  810.         <xsl:variable name="Link" select="concat($hp,$sm,$Database,$sl,@Id,$qm,'Language',$es,$Language,$am,'System',$es,$System,$am,'Eid',$es,@Eid)"/>
  811.         <xsl:element name="a">
  812.           <xsl:attribute name="class">ContentLink</xsl:attribute>
  813.           <xsl:attribute name="href"><xsl:value-of select="$Link"/></xsl:attribute>
  814.           <xsl:apply-templates/>
  815.         </xsl:element>
  816.       </xsl:otherwise>
  817.     </xsl:choose>
  818.   </xsl:template>
  819.   
  820.   
  821.   <!-- 
  822.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  823.   | PROCESSING OF ANCHORS                                            |
  824.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  825.   | These can be based on help index keywords or Help-IDs            |
  826.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  827.   -->
  828.   
  829.   <!-- Process anchor names (help index keywords) -->
  830.   <xsl:template match="help:key-word">
  831.     <xsl:element name="a">
  832.       <xsl:attribute name="name"><xsl:value-of select="@tag"/></xsl:attribute>
  833.     </xsl:element>
  834.   </xsl:template>
  835.   <xsl:template match="help:key-word" mode="doctitle">
  836.     <xsl:element name="a">
  837.       <xsl:attribute name="name"><xsl:value-of select="@tag"/></xsl:attribute>
  838.     </xsl:element>
  839.   </xsl:template>
  840.   <!-- Process anchor names (help ids) -->
  841.   <xsl:template match="help:help-id">
  842.     <xsl:element name="a">
  843.       <xsl:attribute name="name"><xsl:value-of select="@value"/></xsl:attribute>
  844.     </xsl:element>
  845.   </xsl:template>
  846.   <xsl:template match="help:help-id" mode="doctitle">
  847.     <xsl:element name="a">
  848.       <xsl:attribute name="name"><xsl:value-of select="@value"/></xsl:attribute>
  849.     </xsl:element>
  850.   </xsl:template>
  851.   
  852.   <!-- 
  853.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  854.   | PROCESSING OF LINKS                                              |
  855.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  856.   -->
  857.   
  858.   <!-- Process help links -->
  859.   <xsl:template match="help:link">
  860.     <xsl:choose>
  861.       <xsl:when test="@Eid">
  862.         <xsl:variable name="Link" select="concat($hp,$sm,$Database,$sl,@Id,$qm,'Language',$es,$Language,$am,'System',$es,$System,'#',@Eid)"/>
  863.         <xsl:element name="a">
  864.           <xsl:attribute name="class">ContentLink</xsl:attribute>
  865.           <xsl:attribute name="href"><xsl:value-of select="$Link"/></xsl:attribute>
  866.           <xsl:apply-templates/>
  867.         </xsl:element>
  868.       </xsl:when>
  869.       <xsl:otherwise>
  870.         <xsl:variable name="Link" select="concat($hp,$sm,$Database,$sl,@Id,$qm,'Language',$es,$Language,$am,'System',$es,$System)"/>
  871.         <xsl:element name="a">
  872.           <xsl:attribute name="class">ContentLink</xsl:attribute>
  873.           <xsl:attribute name="href"><xsl:value-of select="$Link"/></xsl:attribute>
  874.           <xsl:apply-templates/>
  875.         </xsl:element>
  876.       </xsl:otherwise>
  877.     </xsl:choose>
  878.   </xsl:template>
  879.   <xsl:template match="help:link" mode="embedded">
  880.     <xsl:choose>
  881.       <xsl:when test="@Eid">
  882.         <xsl:variable name="Link" select="concat($hp,$sm,$Database,$sl,@Id,$qm,'Language',$es,$Language,$am,'System',$es,$System,'#',@Eid)"/>
  883.         <xsl:element name="a">
  884.           <xsl:attribute name="class">ContentLink</xsl:attribute>
  885.           <xsl:attribute name="href"><xsl:value-of select="$Link"/></xsl:attribute>
  886.           <xsl:apply-templates/>
  887.         </xsl:element>
  888.       </xsl:when>
  889.       <xsl:otherwise>
  890.         <xsl:variable name="Link" select="concat($hp,$sm,$Database,$sl,@Id,$qm,'Language',$es,$Language,$am,'System',$es,$System)"/>
  891.         <xsl:element name="a">
  892.           <xsl:attribute name="class">ContentLink</xsl:attribute>
  893.           <xsl:attribute name="href"><xsl:value-of select="$Link"/></xsl:attribute>
  894.           <xsl:apply-templates/>
  895.         </xsl:element>
  896.       </xsl:otherwise>
  897.     </xsl:choose>
  898.   </xsl:template>
  899.   <xsl:template match="help:link" mode="doctitle">
  900.     <xsl:apply-templates/>
  901.   </xsl:template>
  902.   
  903.   <!-- 
  904.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  905.   | PROCESSING OF IMAGES                                              |
  906.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  907.   -->
  908.   
  909.   <!-- Process images -->
  910.   <xsl:template match="draw:image | office:image">
  911.     <xsl:element name="img">
  912.       <xsl:variable name="pictureLink" select="concat($hp,$sm,'picture',$sl,@xlink:href,$qm,'Language',$es,$Language,$am,'System',$es,$System)"/>
  913.       <xsl:attribute name="src"><xsl:value-of select="$pictureLink"/></xsl:attribute>
  914.       <xsl:attribute name="width"><xsl:value-of select="round(substring-before(@svg:width,'cm')*37.8)"/></xsl:attribute>
  915.       <xsl:attribute name="height"><xsl:value-of select="round(substring-before(@svg:height,'cm')*37.8)"/></xsl:attribute>
  916.     </xsl:element>
  917.   </xsl:template>
  918.   <!-- Remove residues of formatting information -->
  919.   <xsl:template match="style"/>
  920.   <!-- Add CSS link to custom.css -->
  921.   <xsl:template match="help:css-file-link">
  922.     <xsl:variable name="CssStylesheet" select="concat($hp,$sm,$cs,$sl,$qm,'Language',$es,$Language,$am,'System',$es,$System)"/>
  923.     <xsl:element name="link">
  924.       <xsl:attribute name="rel">STYLESHEET</xsl:attribute>
  925.       <xsl:attribute name="href"><xsl:value-of select="$CssStylesheet"/></xsl:attribute>
  926.       <xsl:attribute name="type">text/css</xsl:attribute>
  927.     </xsl:element>
  928.     <!-- Add Encoding meta tag for correct display of asian text -->
  929.     <xsl:element name="meta">
  930.       <xsl:attribute name="http-equiv">Content-type</xsl:attribute>
  931.       <xsl:attribute name="content">text/html; charset=utf-8</xsl:attribute>
  932.     </xsl:element>
  933.   </xsl:template>
  934.   
  935.   <!-- 
  936.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  937.   | ERROR HANDLING                                                   |
  938.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  939.   -->
  940.   
  941.   <!-- error handling -->
  942.   <xsl:template match="help:error-id">
  943.     <xsl:value-of select="$Id"/>
  944.   </xsl:template>
  945.   <xsl:template match="help:error-module">
  946.     <xsl:value-of select="$Database"/>
  947.   </xsl:template>
  948.   <xsl:template match="help:error-path">
  949.     <xsl:value-of select="$Path"/>
  950.   </xsl:template>
  951.  
  952.   <!-- 
  953.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  954.   | PROCESSING OF PRODUCT INFORMATION/BRANDING                       |
  955.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  956.   -->
  957.   
  958.   <!-- Branding -->
  959.   <xsl:template match="help:productname">
  960.     <xsl:element name="span">
  961.       <xsl:attribute name="class">prod</xsl:attribute>
  962.       <xsl:value-of select="$productname"/>
  963.     </xsl:element>
  964.   </xsl:template>
  965.   <xsl:template match="help:productversion">
  966.     <xsl:element name="span">
  967.       <xsl:attribute name="class">prod</xsl:attribute>
  968.       <xsl:value-of select="$productversion"/>
  969.     </xsl:element>
  970.   </xsl:template>
  971.   <xsl:template match="help:productpath">{installpath}</xsl:template>
  972.   <xsl:template match="help:vendorname">
  973.     <xsl:element name="span">
  974.       <xsl:attribute name="class">vendor</xsl:attribute>
  975.       <xsl:value-of select="$vendorname"/>
  976.     </xsl:element>
  977.   </xsl:template>
  978.   <xsl:template match="help:vendorversion">
  979.     <xsl:element name="span">
  980.       <xsl:attribute name="class">vendor</xsl:attribute>
  981.       <xsl:value-of select="$vendorversion"/>
  982.     </xsl:element>
  983.   </xsl:template>
  984.   <xsl:template match="help:vendorpath">{installpath}</xsl:template>
  985.   <xsl:template match="help:vendorshort">
  986.     <xsl:element name="span">
  987.       <xsl:attribute name="class">vendor</xsl:attribute>
  988.       <xsl:value-of select="$vendorshort"/>
  989.     </xsl:element>
  990.   </xsl:template>
  991.   <xsl:template match="help:productname" mode="doctitle">
  992.     <xsl:value-of select="$productname"/>
  993.   </xsl:template>
  994.   <xsl:template match="help:productversion" mode="doctitle">
  995.     <xsl:value-of select="$productversion"/>
  996.   </xsl:template>
  997.   <xsl:template match="help:productpath" mode="doctitle">{installpath}</xsl:template>
  998.   <xsl:template match="help:vendorname" mode="doctitle">
  999.     <xsl:value-of select="$vendorname"/>
  1000.   </xsl:template>
  1001.   <xsl:template match="help:vendorversion" mode="doctitle">
  1002.     <xsl:value-of select="$vendorversion"/>
  1003.   </xsl:template>
  1004.   <xsl:template match="help:vendorpath" mode="doctitle">{installpath}</xsl:template>
  1005.   <xsl:template match="help:vendorshort" mode="doctitle">
  1006.     <xsl:value-of select="$vendorshort"/>
  1007.   </xsl:template>
  1008.   <xsl:template match="help:productname" mode="popup">
  1009.     <xsl:value-of select="$productname"/>
  1010.   </xsl:template>
  1011.   <xsl:template match="help:productversion" mode="popup">
  1012.     <xsl:value-of select="$productversion"/>
  1013.   </xsl:template>
  1014.   <xsl:template match="help:productpath" mode="popup">{installpath}</xsl:template>
  1015.   <xsl:template match="help:vendorname" mode="popup">
  1016.     <xsl:value-of select="$vendorname"/>
  1017.   </xsl:template>
  1018.   <xsl:template match="help:vendorversion" mode="popup">
  1019.     <xsl:value-of select="$vendorversion"/>
  1020.   </xsl:template>
  1021.   <xsl:template match="help:vendorpath" mode="popup">{installpath}</xsl:template>
  1022.   <xsl:template match="help:vendorshort" mode="popup">
  1023.     <xsl:value-of select="$vendorshort"/>
  1024.   </xsl:template>
  1025.   <xsl:template match="help:productname" mode="embedded">
  1026.     <xsl:value-of select="$productname"/>
  1027.   </xsl:template>
  1028.   <xsl:template match="help:productversion" mode="embedded">
  1029.     <xsl:value-of select="$productversion"/>
  1030.   </xsl:template>
  1031.   <xsl:template match="help:productpath" mode="embedded">{installpath}</xsl:template>
  1032.   <xsl:template match="help:vendorname" mode="embedded">
  1033.     <xsl:value-of select="$vendorname"/>
  1034.   </xsl:template>
  1035.   <xsl:template match="help:vendorversion" mode="embedded">
  1036.     <xsl:value-of select="$vendorversion"/>
  1037.   </xsl:template>
  1038.   <xsl:template match="help:vendorpath" mode="embedded">{installpath}</xsl:template>
  1039.   <xsl:template match="help:vendorshort" mode="embedded">
  1040.     <xsl:value-of select="$vendorshort"/>
  1041.   </xsl:template>
  1042.   
  1043.    <!-- 
  1044.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1045.   | ADDITIONAL STUFF                                                 |
  1046.   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1047.   -->
  1048.    
  1049.   <!-- admin info -->
  1050.   <xsl:template match="referenznumber"/>
  1051.   <!-- spacing -->
  1052.   <xsl:template match="text:s">
  1053.     <!-- not currentyl working -->
  1054.     <xsl:apply-templates/>
  1055.   </xsl:template>
  1056.   <xsl:template match="text:tab-stop">
  1057.     <xsl:call-template name="spacer">
  1058.       <xsl:with-param name="width">
  1059.         <xsl:value-of select="$tabwidth"/>
  1060.       </xsl:with-param>
  1061.     </xsl:call-template>
  1062.     <xsl:apply-templates/>
  1063.   </xsl:template>
  1064.    
  1065.   <xsl:template name="loop">
  1066.     <xsl:param name="ct">1</xsl:param>
  1067.     <xsl:param name="cur">1</xsl:param>
  1068.     <xsl:param name="wdth">1</xsl:param>
  1069.     <xsl:call-template name="spacer">
  1070.       <xsl:with-param name="width">
  1071.         <xsl:value-of select="$wdth"/>
  1072.       </xsl:with-param>
  1073.     </xsl:call-template>
  1074.     <xsl:if test="$cur < $ct">
  1075.       <xsl:call-template name="loop">
  1076.         <xsl:with-param name="ct">
  1077.           <xsl:value-of select="$ct"/>
  1078.         </xsl:with-param>
  1079.         <xsl:with-param name="cur">
  1080.           <xsl:value-of select="$cur+1"/>
  1081.         </xsl:with-param>
  1082.         <xsl:with-param name="wdth">
  1083.           <xsl:value-of select="$wdth"/>
  1084.         </xsl:with-param>
  1085.       </xsl:call-template>
  1086.     </xsl:if>
  1087.   </xsl:template>
  1088.   
  1089.   <xsl:template name="spacer">
  1090.     <xsl:param name="width">1</xsl:param>
  1091.     <xsl:element name="img">
  1092.       <xsl:variable name="pictureLink" select="concat($hp,$sm,'picture',$sl,$onepixel,$qm,'Language',$es,$Language,$am,'System',$es,$System)"/>
  1093.       <xsl:attribute name="src"><xsl:value-of select="$pictureLink"/></xsl:attribute>
  1094.       <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
  1095.       <xsl:attribute name="height">1</xsl:attribute>
  1096.     </xsl:element>
  1097.   </xsl:template>
  1098. </xsl:stylesheet>
  1099.