1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
20 <xsl:output indent=
"yes" method=
"xml"/>
22 <!-- SPECIFY YOUR FILE SYSTEM ROOT PATH TO THE HELP FILES -->
23 <xsl:param name=
"fsroot" select=
"'file:///handbuch/WORKBENCH/helpcontent2/source/'"/>
26 ######################################################
28 ######################################################
30 <xsl:template match=
"/">
31 <xsl:apply-templates/>
34 <xsl:template match=
"*|@*|comment()|processing-instruction()|text()">
36 <xsl:apply-templates select=
"*|@*|comment()|processing-instruction()|text()"/>
40 <xsl:template match=
"*|@*|comment()|processing-instruction()|text()" mode=
"embedded">
42 <xsl:apply-templates select=
"*|@*|comment()|processing-instruction()|text()" mode=
"embedded"/>
46 <xsl:template match=
"bookmark" mode=
"embedded" />
47 <xsl:template match=
"ahelp" mode=
"embedded">
48 <xsl:apply-templates mode=
"embedded"/>
51 <xsl:template match=
"paragraph[@role='heading']">
53 <xsl:apply-templates/>
57 <xsl:template match=
"paragraph[@role=*]">
59 <xsl:apply-templates/>
63 <xsl:template match=
"sort">
64 <xsl:apply-templates/>
69 ######################################################
71 ######################################################
73 <xsl:template match=
"embed">
75 <xsl:variable name=
"href"><xsl:value-of select=
"substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
76 <xsl:variable name=
"anchor"><xsl:value-of select=
"substring-after(@href,'#')"/></xsl:variable>
77 <xsl:variable name=
"doc" select=
"document($href)"/>
78 <xsl:apply-templates select=
"$doc//section[@id=$anchor]" mode=
"embedded"/>
79 <xsl:if test=
"not($doc//section[@id=$anchor])"> <!-- fallback for embeds that actually should be embedvars -->
80 <paragraph role=
"paragraph"><xsl:apply-templates select=
"$doc//variable[@id=$anchor]" mode=
"embedded"/></paragraph>
85 ######################################################
87 ######################################################
89 <xsl:template match=
"embedvar">
90 <xsl:if test=
"not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
91 <xsl:variable name=
"href"><xsl:value-of select=
"substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
92 <xsl:variable name=
"anchor"><xsl:value-of select=
"substring-after(@href,'#')"/></xsl:variable>
93 <xsl:variable name=
"doc" select=
"document($href)"/>
94 <xsl:apply-templates select=
"$doc//variable[@id=$anchor]" mode=
"embedded"/>
97 <!-- FPE: embedvars, that point to "text/shared/00/00000004.xml#wie" will only be resolved in the main_transform -->