summaryrefslogtreecommitdiff
path: root/xmlhelp/util
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-08-11 09:57:55 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-09-20 16:11:23 +0200
commit28dff3780f9074f585bd626e2f06c94124ef4910 (patch)
tree9af8f298166c110af5e180170ed3a4ea3ff8d240 /xmlhelp/util
parent732d2e8bb19dbb65f6786e0d109020c189920e1e (diff)
Clean up xsl files
* Remove trailing spaces * Use 4 spaces for indentation everywhere See discussion at https://lists.freedesktop.org/archives/libreoffice/2017-September/078433.html Change-Id: I0bb9a0b9b0502cdf0870529cea37ee9c4d1ffdf4 Reviewed-on: https://gerrit.libreoffice.org/41009 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlhelp/util')
-rw-r--r--xmlhelp/util/compact.xsl8
-rw-r--r--xmlhelp/util/embed.xsl48
-rw-r--r--xmlhelp/util/idxcaption.xsl38
-rw-r--r--xmlhelp/util/idxcontent.xsl30
-rw-r--r--xmlhelp/util/main_transform.xsl1026
5 files changed, 575 insertions, 575 deletions
diff --git a/xmlhelp/util/compact.xsl b/xmlhelp/util/compact.xsl
index 9d61963ce1b4..781ad3179296 100644
--- a/xmlhelp/util/compact.xsl
+++ b/xmlhelp/util/compact.xsl
@@ -11,8 +11,8 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
- <xsl:strip-space elements="*"/>
- <xsl:preserve-space elements="paragraph"/>
+ <xsl:strip-space elements="*"/>
+ <xsl:preserve-space elements="paragraph"/>
<!-- Copy everything -->
<xsl:template match="@*|node()|text()">
@@ -21,8 +21,8 @@
</xsl:copy>
</xsl:template>
- <!-- To remove attributes or nodes,
- simply write a matching template that doesn't do anything.
+ <!-- To remove attributes or nodes,
+ simply write a matching template that doesn't do anything.
Therefore, it is removed -->
<xsl:template match="image/@localize">
<xsl:copy>
diff --git a/xmlhelp/util/embed.xsl b/xmlhelp/util/embed.xsl
index a611e4dbcbc0..0cc067714cf8 100644
--- a/xmlhelp/util/embed.xsl
+++ b/xmlhelp/util/embed.xsl
@@ -28,7 +28,7 @@ All others
######################################################
-->
<xsl:template match="/">
- <xsl:apply-templates/>
+ <xsl:apply-templates/>
</xsl:template>
<xsl:template match="*|@*|comment()|processing-instruction()|text()">
@@ -45,7 +45,7 @@ All others
<xsl:template match="bookmark" mode="embedded" />
<xsl:template match="ahelp" mode="embedded">
- <xsl:apply-templates mode="embedded"/>
+ <xsl:apply-templates mode="embedded"/>
</xsl:template>
<xsl:template match="paragraph[@role='heading']">
@@ -65,36 +65,36 @@ All others
</xsl:template>
-<!--
-######################################################
+<!--
+######################################################
EMBED
-######################################################
+######################################################
-->
<xsl:template match="embed">
- <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
- <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
- <xsl:variable name="doc" select="document($href)"/>
- <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
- <xsl:if test="not($doc//section[@id=$anchor])"> <!-- fallback for embeds that actually should be embedvars -->
- <paragraph role="paragraph"><xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/></paragraph>
- </xsl:if>
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ <xsl:if test="not($doc//section[@id=$anchor])"> <!-- fallback for embeds that actually should be embedvars -->
+ <paragraph role="paragraph"><xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/></paragraph>
+ </xsl:if>
</xsl:template>
-<!--
-######################################################
+<!--
+######################################################
EMBEDVAR
-######################################################
+######################################################
-->
<xsl:template match="embedvar">
- <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
- <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
- <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
- <xsl:variable name="doc" select="document($href)"/>
- <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
- </xsl:if>
-
- <!-- FPE: embedvars, that point to "text/shared/00/00000004.xml#wie" will only be resolved in the main_transform -->
-
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:if>
+
+ <!-- FPE: embedvars, that point to "text/shared/00/00000004.xml#wie" will only be resolved in the main_transform -->
+
</xsl:template>
</xsl:stylesheet>
diff --git a/xmlhelp/util/idxcaption.xsl b/xmlhelp/util/idxcaption.xsl
index 08f09d70cefc..398b59af3c98 100644
--- a/xmlhelp/util/idxcaption.xsl
+++ b/xmlhelp/util/idxcaption.xsl
@@ -16,33 +16,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<xsl:stylesheet version="1.0" encoding="UTF-8"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:office="http://openoffice.org/2000/office"
- xmlns:style="http://openoffice.org/2000/style"
- xmlns:table="http://openoffice.org/2000/table"
- xmlns:draw="http://openoffice.org/2000/drawing"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- 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:help="http://openoffice.org/2000/help"
- xmlns:index="http://sun.com/2000/XMLSearch"
- xmlns:text="http://openoffice.org/2000/text">
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ 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:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
<xsl:param name="Language" select="'en-US'"/>
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
- <xsl:apply-templates select="//title" mode="include"/>
- <xsl:apply-templates select="//paragraph[@role='heading']" mode="include"/>
+ <xsl:apply-templates select="//title" mode="include"/>
+ <xsl:apply-templates select="//paragraph[@role='heading']" mode="include"/>
</xsl:template>
<xsl:template match="*" mode="include">
- <xsl:value-of select="."/>
- <xsl:text>&#xA;</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="*"/>
diff --git a/xmlhelp/util/idxcontent.xsl b/xmlhelp/util/idxcontent.xsl
index c09e04500f71..d06b4f67ba36 100644
--- a/xmlhelp/util/idxcontent.xsl
+++ b/xmlhelp/util/idxcontent.xsl
@@ -16,21 +16,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<xsl:stylesheet version="1.0" encoding="UTF-8"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:office="http://openoffice.org/2000/office"
- xmlns:style="http://openoffice.org/2000/style"
- xmlns:table="http://openoffice.org/2000/table"
- xmlns:draw="http://openoffice.org/2000/drawing"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- 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:help="http://openoffice.org/2000/help"
- xmlns:index="http://sun.com/2000/XMLSearch"
- xmlns:text="http://openoffice.org/2000/text">
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ 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:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
<xsl:param name="Language" select="'en-US'"/>
<xsl:output method="text" encoding="UTF-8"/>
diff --git a/xmlhelp/util/main_transform.xsl b/xmlhelp/util/main_transform.xsl
index 9a40abb66f15..ac1b3abb7d9d 100644
--- a/xmlhelp/util/main_transform.xsl
+++ b/xmlhelp/util/main_transform.xsl
@@ -80,15 +80,15 @@
<xsl:param name="Database" select="'swriter'"/>
<xsl:variable name="module" select="$Database"/>
<xsl:variable name="appl">
- <xsl:choose>
- <xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
- <xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
- <xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
- <xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
- <xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
- <xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
- <xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
+ <xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
+ <xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
+ <xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
+ <xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
+ <xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
+ <xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
+ </xsl:choose>
</xsl:variable>
<!-- the other parameters given by the help caller -->
@@ -96,7 +96,7 @@
<xsl:param name="productname" select="'Office'"/>
<xsl:param name="productversion" select="''"/>
<xsl:variable name="pversion">
- <xsl:value-of select="translate($productversion,' ','')"/>
+ <xsl:value-of select="translate($productversion,' ','')"/>
</xsl:variable>
<!-- this is were the images are -->
<xsl:param name="imgtheme" select="''"/>
@@ -113,7 +113,7 @@
<xsl:variable name="img_url_prefix" select="concat('vnd.libreoffice.image://',$imgtheme,'/')"/>
<xsl:variable name="img_url_internal" select="'vnd.libreoffice.image://helpimg/'"/>
<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
-<xsl:variable name="urlpre" select="$help_url_prefix" />
+<xsl:variable name="urlpre" select="$help_url_prefix" />
<xsl:variable name="linkprefix" select="$urlpre"/>
<xsl:variable name="linkpostfix" select="$urlpost"/>
@@ -132,22 +132,22 @@
<!-- Create the document skeleton -->
<xsl:template match="/">
- <xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
- <html>
- <head>
- <title><xsl:value-of select="$title"/></title>
- <link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
- </head>
- <body lang="{$lang}">
- <xsl:apply-templates select="/helpdocument/body"/>
- </body>
- </html>
+ <xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
+ <html>
+ <head>
+ <title><xsl:value-of select="$title"/></title>
+ <link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ </head>
+ <body lang="{$lang}">
+ <xsl:apply-templates select="/helpdocument/body"/>
+ </body>
+ </html>
</xsl:template>
<!-- AHELP -->
<xsl:template match="ahelp">
- <xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
+ <xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
</xsl:template>
<!-- ALT -->
@@ -155,11 +155,11 @@
<!-- BOOKMARK -->
<xsl:template match="bookmark">
- <a name="{@id}"></a>
- <xsl:choose>
- <xsl:when test="starts-with(@branch,'hid')" />
- <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
- </xsl:choose>
+ <a name="{@id}"></a>
+ <xsl:choose>
+ <xsl:when test="starts-with(@branch,'hid')" />
+ <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="bookmark" mode="embedded" />
@@ -175,17 +175,17 @@
<!-- CASE -->
<xsl:template match="case"><xsl:call-template name="insertcase" /></xsl:template>
<xsl:template match="case" mode="embedded">
- <xsl:call-template name="insertcase">
- <xsl:with-param name="embedded" select="'yes'"/>
- </xsl:call-template>
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
</xsl:template>
<!-- CASEINLINE -->
<xsl:template match="caseinline"><xsl:call-template name="insertcase" /></xsl:template>
<xsl:template match="caseinline" mode="embedded">
- <xsl:call-template name="insertcase">
- <xsl:with-param name="embedded" select="'yes'"/>
- </xsl:call-template>
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
</xsl:template>
<!-- COMMENT -->
@@ -198,17 +198,17 @@
<!-- DEFAULT -->
<xsl:template match="default"><xsl:call-template name="insertdefault" /></xsl:template>
<xsl:template match="default" mode="embedded">
- <xsl:call-template name="insertdefault">
- <xsl:with-param name="embedded" select="'yes'"/>
- </xsl:call-template>
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
</xsl:template>
<!-- DEFAULTINLINE -->
<xsl:template match="defaultinline"><xsl:call-template name="insertdefault" /></xsl:template>
<xsl:template match="defaultinline" mode="embedded">
- <xsl:call-template name="insertdefault">
- <xsl:with-param name="embedded" select="'yes'"/>
- </xsl:call-template>
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
</xsl:template>
<!-- EMBED -->
@@ -221,26 +221,26 @@
<!-- EMPH -->
<xsl:template match="emph">
- <span class="emph"><xsl:apply-templates /></span>
+ <span class="emph"><xsl:apply-templates /></span>
</xsl:template>
<xsl:template match="emph" mode="embedded">
- <span class="emph"><xsl:apply-templates /></span>
+ <span class="emph"><xsl:apply-templates /></span>
</xsl:template>
<!-- SUB -->
<xsl:template match="sub">
- <sub><xsl:apply-templates /></sub>
+ <sub><xsl:apply-templates /></sub>
</xsl:template>
<xsl:template match="sub" mode="embedded">
- <sub><xsl:apply-templates /></sub>
+ <sub><xsl:apply-templates /></sub>
</xsl:template>
<!-- SUP -->
<xsl:template match="sup">
- <sup><xsl:apply-templates /></sup>
+ <sup><xsl:apply-templates /></sup>
</xsl:template>
<xsl:template match="sup" mode="embedded">
- <sup><xsl:apply-templates /></sup>
+ <sup><xsl:apply-templates /></sup>
</xsl:template>
<!-- FILENAME -->
@@ -259,64 +259,64 @@
<!-- LINK -->
<xsl:template match="link">
- <xsl:choose> <!-- don't insert the heading link to itself -->
- <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
- <xsl:apply-templates />
- </xsl:when>
- <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
- <xsl:call-template name="insert_howtoget">
- <xsl:with-param name="linkhref" select="@href"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="createlink" />
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose> <!-- don't insert the heading link to itself -->
+ <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:call-template name="insert_howtoget">
+ <xsl:with-param name="linkhref" select="@href"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="createlink" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="link" mode="embedded">
- <xsl:call-template name="createlink"/>
+ <xsl:call-template name="createlink"/>
</xsl:template>
<!-- LIST -->
<xsl:template match="list">
- <xsl:choose>
- <xsl:when test="@type='ordered'">
- <ol>
- <xsl:if test="@startwith">
- <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates />
- </ol>
- </xsl:when>
- <xsl:otherwise>
- <ul><xsl:apply-templates /></ul>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates />
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates /></ul>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="list" mode="embedded">
- <xsl:choose>
- <xsl:when test="@type='ordered'">
- <ol>
- <xsl:if test="@startwith">
- <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates mode="embedded"/>
- </ol>
- </xsl:when>
- <xsl:otherwise>
- <ul><xsl:apply-templates mode="embedded"/></ul>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates mode="embedded"/>
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates mode="embedded"/></ul>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- LISTITEM -->
<xsl:template match="listitem">
- <li><xsl:apply-templates /></li>
+ <li><xsl:apply-templates /></li>
</xsl:template>
<xsl:template match="listitem" mode="embedded">
- <li><xsl:apply-templates mode="embedded"/></li>
+ <li><xsl:apply-templates mode="embedded"/></li>
</xsl:template>
<!-- META, SEE HEADER -->
@@ -327,127 +327,127 @@
<!-- PARAGRAPH -->
<xsl:template match="paragraph">
- <xsl:choose>
-
- <xsl:when test="@role='heading'">
- <xsl:call-template name="insertheading">
- <xsl:with-param name="level" select="@level"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains(' note warning tip ',@role)">
- <xsl:call-template name="insertnote">
- <xsl:with-param name="type" select="@role" />
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
- <xsl:apply-templates />
- </xsl:when>
-
- <xsl:when test="@role='bascode'">
- <xsl:call-template name="insertbascode" />
- </xsl:when>
-
- <xsl:when test="@role='logocode'">
- <xsl:call-template name="insertlogocode" />
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:call-template name="insertpara" />
- </xsl:otherwise>
-
- </xsl:choose>
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'">
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="@level"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:when test="@role='bascode'">
+ <xsl:call-template name="insertbascode" />
+ </xsl:when>
+
+ <xsl:when test="@role='logocode'">
+ <xsl:call-template name="insertlogocode" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
</xsl:template>
<xsl:template match="paragraph" mode="embedded">
- <xsl:choose>
-
- <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded -->
- <!--
- The internal sablotron processor does not seem to support the number function.
- Therefore, we need a workaround for
- <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
- -->
- <xsl:variable name="newlevel">
- <xsl:choose>
- <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
- <xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
- <xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
- <xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
- <xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:call-template name="insertheading">
- <xsl:with-param name="level" select="$newlevel"/>
- <xsl:with-param name="embedded" select="'yes'"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains(' note warning tip ',@role)">
- <xsl:call-template name="insertnote">
- <xsl:with-param name="type" select="@role" />
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
- <xsl:apply-templates />
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:call-template name="insertpara" />
- </xsl:otherwise>
-
- </xsl:choose>
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded -->
+ <!--
+ The internal sablotron processor does not seem to support the number function.
+ Therefore, we need a workaround for
+ <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
+ -->
+ <xsl:variable name="newlevel">
+ <xsl:choose>
+ <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
+ <xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
+ <xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="$newlevel"/>
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
</xsl:template>
<!-- SECTION -->
<xsl:template match="section">
- <a name="{@id}"></a>
-
- <xsl:choose>
-
- <xsl:when test="@id='relatedtopics'">
- <div class="relatedtopics">
- <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
- <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
- <xsl:variable name="doc" select="document($href)"/>
- <p class="related">
- <xsl:apply-templates select="$doc//variable[@id=$anchor]"/>
- </p>
- <div class="relatedbody">
- <xsl:apply-templates />
- </div>
- </div>
- </xsl:when>
-
- <xsl:when test="@id='howtoget'">
- <xsl:call-template name="insert_howtoget" />
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
-
- </xsl:choose>
+ <a name="{@id}"></a>
+
+ <xsl:choose>
+
+ <xsl:when test="@id='relatedtopics'">
+ <div class="relatedtopics">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <p class="related">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]"/>
+ </p>
+ <div class="relatedbody">
+ <xsl:apply-templates />
+ </div>
+ </div>
+ </xsl:when>
+
+ <xsl:when test="@id='howtoget'">
+ <xsl:call-template name="insert_howtoget" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+
+ </xsl:choose>
</xsl:template>
<!-- SECTION -->
<xsl:template match="section" mode="embedded">
- <a name="{@id}"></a>
- <xsl:apply-templates mode="embedded"/>
+ <a name="{@id}"></a>
+ <xsl:apply-templates mode="embedded"/>
</xsl:template>
<!-- SORT -->
<xsl:template match="sort" >
- <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="sort" mode="embedded">
- <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
</xsl:template>
<!-- SWITCH -->
@@ -483,21 +483,21 @@
<xsl:template match="variable" mode="embedded"><a name="{@id}"></a><xsl:apply-templates mode="embedded"/></xsl:template>
<xsl:template match="text()">
- <xsl:call-template name="brand">
- <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
- </xsl:call-template>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
</xsl:template>
<xsl:template match="text()" mode="embedded">
- <xsl:call-template name="brand">
- <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
- </xsl:call-template>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
</xsl:template>
<!-- In case of missing help files -->
<xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template>
-<!--
+<!--
###################
# NAMED TEMPLATES #
###################
@@ -505,296 +505,296 @@
<!-- Branding -->
<xsl:template name="brand" >
- <xsl:param name="string"/>
-
+ <xsl:param name="string"/>
+
<xsl:choose>
-
+
<xsl:when test="contains($string,$brand1)">
<xsl:variable name="newstr">
<xsl:value-of select="substring-before($string,$brand1)"/>
<xsl:value-of select="$productname"/>
<xsl:value-of select="substring-after($string,$brand1)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains($string,$brand2)">
- <xsl:variable name="newstr">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand2)">
+ <xsl:variable name="newstr">
<xsl:value-of select="substring-before($string,$brand2)"/>
<xsl:value-of select="$pversion"/>
<xsl:value-of select="substring-after($string,$brand2)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="contains($string,$brand3)">
- <xsl:variable name="newstr">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand3)">
+ <xsl:variable name="newstr">
<xsl:value-of select="substring-before($string,$brand3)"/>
<xsl:value-of select="$productname"/>
<xsl:value-of select="substring-after($string,$brand3)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
-
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
<xsl:when test="contains($string,$brand4)">
- <xsl:variable name="newstr">
+ <xsl:variable name="newstr">
<xsl:value-of select="substring-before($string,$brand4)"/>
<xsl:value-of select="$pversion"/>
<xsl:value-of select="substring-after($string,$brand4)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
-
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
<xsl:otherwise>
- <xsl:value-of select="$string"/>
- </xsl:otherwise>
- </xsl:choose>
-
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:template>
<!-- Insert Paragraph -->
<xsl:template name="insertpara">
- <xsl:variable name="role">
- <xsl:choose>
- <xsl:when test="ancestor::table">
- <xsl:value-of select="concat(@role,'intable')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@role"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <p class="{$role}"><xsl:apply-templates /></p>
+ <xsl:variable name="role">
+ <xsl:choose>
+ <xsl:when test="ancestor::table">
+ <xsl:value-of select="concat(@role,'intable')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@role"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <p class="{$role}"><xsl:apply-templates /></p>
</xsl:template>
<!-- Insert Basic code snippet -->
<xsl:template name="insertbascode">
- <pre><xsl:apply-templates /></pre>
+ <pre><xsl:apply-templates /></pre>
</xsl:template>
<!-- Insert Logo code snippet -->
<xsl:template name="insertlogocode">
- <pre><xsl:apply-templates /></pre>
+ <pre><xsl:apply-templates /></pre>
</xsl:template>
<!-- Insert "How to get Link" -->
<xsl:template name="insert_howtoget">
- <xsl:param name="linkhref" />
- <xsl:variable name="archive" select="'shared'"/>
- <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
- <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
- <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
- <tr>
- <td>
- <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
- <div class="howtogetbody">
- <xsl:choose>
- <xsl:when test="$linkhref = ''"> <!-- new style -->
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise> <!-- old style -->
- <xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
- <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
- <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
- <xsl:variable name="docum" select="document($href)"/>
-
- <xsl:call-template name="insertembed">
- <xsl:with-param name="doc" select="$docum" />
- <xsl:with-param name="anchor" select="$anc" />
- </xsl:call-template>
-
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </td>
- </tr>
- </table>
- <br/>
+ <xsl:param name="linkhref" />
+ <xsl:variable name="archive" select="'shared'"/>
+ <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
+ <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
+ <tr>
+ <td>
+ <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
+ <div class="howtogetbody">
+ <xsl:choose>
+ <xsl:when test="$linkhref = ''"> <!-- new style -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise> <!-- old style -->
+ <xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
+
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <br/>
</xsl:template>
<!-- Create a link -->
<xsl:template name="createlink">
<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
- <xsl:choose>
- <xsl:when test="starts-with(@href,'http://') or starts-with(@href,'https://')"> <!-- web links -->
- <a href="{@href}"><xsl:apply-templates /></a>
- </xsl:when>
- <xsl:when test="contains(@href,'#')">
- <xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
- <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
- <a href="{$href}"><xsl:apply-templates /></a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
- <a href="{$href}"><xsl:apply-templates /></a>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="starts-with(@href,'http://') or starts-with(@href,'https://')"> <!-- web links -->
+ <a href="{@href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:when test="contains(@href,'#')">
+ <xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Insert Note, Warning, or Tip -->
<xsl:template name="insertnote">
- <xsl:param name="type" /> <!-- note, tip, or warning -->
- <xsl:variable name="imgsrc">
- <xsl:choose>
- <xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
- <xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
- <xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
- <xsl:variable name="alt">
- <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
- <xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
- <xsl:variable name="doc" select="document($href)"/>
- <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
- </xsl:variable>
- <div class="{$type}">
- <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
- <tr>
- <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
- <td><xsl:apply-templates /></td>
- </tr>
- </table>
- </div>
- <br/>
+ <xsl:param name="type" /> <!-- note, tip, or warning -->
+ <xsl:variable name="imgsrc">
+ <xsl:choose>
+ <xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
+ <xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
+ <xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="alt">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:variable>
+ <div class="{$type}">
+ <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
+ <tr>
+ <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
+ <td><xsl:apply-templates /></td>
+ </tr>
+ </table>
+ </div>
+ <br/>
</xsl:template>
<!-- Insert a heading -->
<xsl:template name="insertheading">
- <xsl:param name="level" />
- <xsl:param name="embedded" />
- <xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:param name="level" />
+ <xsl:param name="embedded" />
+ <xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
</xsl:template>
<!-- Evaluate a case or caseinline switch -->
<xsl:template name="insertcase">
- <xsl:param name="embedded" />
- <xsl:choose>
- <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
- <xsl:if test="@select = $System">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
- <xsl:if test="@select = $appl">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
- <xsl:if test="@select = $distrib">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="@select = $System">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="@select = $appl">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="@select = $distrib">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- Evaluate a default or defaultinline switch -->
<xsl:template name="insertdefault">
- <xsl:param name="embedded" />
-
- <xsl:choose>
- <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
- <xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
- <xsl:if test="not(../child::case[@select=$appl]) and not(../child::caseinline[@select=$appl])">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
- <xsl:if test="not(../child::case[@select=$distrib]) and not(../child::caseinline[@select=$distrib])">
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
+ <xsl:param name="embedded" />
+
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="not(../child::case[@select=$appl]) and not(../child::caseinline[@select=$appl])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="not(../child::case[@select=$distrib]) and not(../child::caseinline[@select=$distrib])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- evaluate embeds -->
<xsl:template name="insertembed">
- <xsl:param name="doc" />
- <xsl:param name="anchor" />
- <!-- different embed targets (also falsely used embed instead embedvar) -->
- <xsl:choose>
- <xsl:when test="$doc//section[@id=$anchor]"> <!-- first test for a section of that name -->
- <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
- </xsl:when>
- <xsl:when test="$doc//paragraph[@id=$anchor]"> <!-- then test for a para of that name -->
- <p class="embedded">
- <xsl:apply-templates select="$doc//paragraph[@id=$anchor]" mode="embedded"/>
- </p>
- </xsl:when>
- <xsl:when test="$doc//variable[@id=$anchor]"> <!-- then test for a variable of that name -->
- <p class="embedded">
- <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
- </p>
- </xsl:when>
- <xsl:otherwise> <!-- then give up -->
- <p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="doc" />
+ <xsl:param name="anchor" />
+ <!-- different embed targets (also falsely used embed instead embedvar) -->
+ <xsl:choose>
+ <xsl:when test="$doc//section[@id=$anchor]"> <!-- first test for a section of that name -->
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:when test="$doc//paragraph[@id=$anchor]"> <!-- then test for a para of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//paragraph[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- then test for a variable of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise> <!-- then give up -->
+ <p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Insert an image -->
@@ -819,115 +819,115 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-
- <!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
- <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
- <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
- <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
- <img src="{$src}" alt="{$alt}" title="{$alt}">
- <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
- <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
- </img>
+
+ <!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
+ <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
+ <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
+ <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
+ <img src="{$src}" alt="{$alt}" title="{$alt}">
+ <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
+ <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
+ </img>
</xsl:template>
<!-- Insert a Table -->
<xsl:template name="inserttable">
- <xsl:variable name="imgsrc"> <!-- see if we are in an image table -->
- <xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
- </xsl:variable>
-
- <xsl:choose>
-
- <xsl:when test="count(descendant::tablecell)=1">
- <table border="0" class="onecell" cellpadding="0" cellspacing="0">
- <xsl:apply-templates />
- </table>
- </xsl:when>
-
- <xsl:when test="descendant::tablecell[1]/descendant::image">
- <table border="0" class="icontable" cellpadding="5" cellspacing="0">
- <xsl:apply-templates mode="icontable"/>
- </table>
- </xsl:when>
-
- <xsl:when test="@class='wide'">
- <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
- <xsl:apply-templates />
- </table>
- </xsl:when>
-
- <xsl:when test="not(@class='')">
- <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
- <xsl:apply-templates />
- </table>
- </xsl:when>
-
- <xsl:otherwise>
- <table border="1" class="border" cellpadding="0" cellspacing="0" >
- <xsl:apply-templates />
- </table>
- </xsl:otherwise>
- </xsl:choose>
-
- <br/>
+ <xsl:variable name="imgsrc"> <!-- see if we are in an image table -->
+ <xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
+ </xsl:variable>
+
+ <xsl:choose>
+
+ <xsl:when test="count(descendant::tablecell)=1">
+ <table border="0" class="onecell" cellpadding="0" cellspacing="0">
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="descendant::tablecell[1]/descendant::image">
+ <table border="0" class="icontable" cellpadding="5" cellspacing="0">
+ <xsl:apply-templates mode="icontable"/>
+ </table>
+ </xsl:when>
+
+ <xsl:when test="@class='wide'">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="not(@class='')">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <table border="1" class="border" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <br/>
</xsl:template>
<xsl:template name="resolveembed">
- <div class="embedded">
- <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
- <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
- <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
- <xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
- <xsl:variable name="docum" select="document($href)"/>
-
- <xsl:call-template name="insertembed">
- <xsl:with-param name="doc" select="$docum" />
- <xsl:with-param name="anchor" select="$anc" />
- </xsl:call-template>
+ <div class="embedded">
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
- </div>
+ </div>
</xsl:template>
<xsl:template name="resolveembedvar">
- <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
- <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
- <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
- <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
- <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
- <xsl:variable name="doc" select="document($href)"/>
- <xsl:choose>
- <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name -->
- <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
- </xsl:when>
- <xsl:otherwise> <!-- or give up -->
- <span class="bug">[<xsl:value-of select="@href"/> not found].</span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:choose>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name -->
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise> <!-- or give up -->
+ <span class="bug">[<xsl:value-of select="@href"/> not found].</span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
</xsl:template>
<!-- Apply -->
<xsl:template name="apply">
- <xsl:param name="embedded" />
- <xsl:choose>
- <xsl:when test="$embedded = 'yes'">
- <xsl:apply-templates mode="embedded"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates />
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template name="createDBpostfix">
- <xsl:param name="archive"/>
- <xsl:variable name="newDB">
- <xsl:choose>
- <xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
+ <xsl:param name="archive"/>
+ <xsl:variable name="newDB">
+ <xsl:choose>
+ <xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
</xsl:template>
</xsl:stylesheet>