1 <?xml version=
"1.0" encoding=
"utf-8" standalone=
"yes" ?>
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 .
20 <xsl:transform xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
21 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance"
22 xmlns:
xs=
"http://www.w3.org/2001/XMLSchema"
23 xmlns:
oor=
"http://openoffice.org/2001/registry"
26 <xsl:param name=
"LIBO_SHARE_FOLDER"/>
27 <xsl:param name=
"LIBO_SHARE_HELP_FOLDER"/>
29 <!-- Get the correct format -->
30 <xsl:output method=
"xml" indent=
"yes"/>
31 <xsl:namespace-alias stylesheet-prefix=
"xs" result-prefix=
"xs"></xsl:namespace-alias>
34 <!-- Remove all comments from the schema files -->
35 <xsl:template match=
"*|@*">
37 <xsl:apply-templates select=
"*|@*"/>
41 <!-- suppress the location of the schema -->
42 <xsl:template match =
"@xsi:schemaLocation"/>
44 <!-- suppress the constraints of the schema
45 <xsl:template match = "constraints"/> -->
47 <!-- suppress all documentation items
48 <xsl:template match = "info"/> -->
50 <!-- suppress constraints for deprecated items -->
51 <xsl:template match =
"constraints[../info/deprecated]"/>
53 <!-- suppress all documentation for deprecated items -->
54 <xsl:template match =
"desc[../deprecated]"/>
55 <xsl:template match =
"label[../deprecated]"/>
57 <!-- copy all other documentation with content -->
58 <xsl:template match=
"desc|label">
60 <xsl:apply-templates select=
"@*"/>
61 <xsl:value-of select=
"."/>
65 <!-- suppress all author items -->
66 <xsl:template match =
"author"/>
68 <!-- suppress values, which are marked as nil -->
69 <xsl:template match=
"value[@xsi:nil='true']" />
71 <!-- copy all other values with content -->
72 <xsl:template match=
"value">
74 <xsl:apply-templates select=
"@*|node()"/>
78 <xsl:template match =
"it|unicode">
80 <xsl:apply-templates select =
"@*|node()"/>
84 <xsl:template match=
"text()">
85 <xsl:call-template name=
"replacetwo">
86 <xsl:with-param name=
"input" select=
"current()"/>
87 <xsl:with-param name=
"pattern1" select=
"'@LIBO_SHARE_FOLDER@'"/>
88 <xsl:with-param name=
"replace1" select=
"$LIBO_SHARE_FOLDER"/>
89 <xsl:with-param name=
"pattern2" select=
"'@LIBO_SHARE_HELP_FOLDER@'"/>
90 <xsl:with-param name=
"replace2" select=
"$LIBO_SHARE_HELP_FOLDER"/>
94 <xsl:template name=
"replace">
95 <xsl:param name=
"input"/>
96 <xsl:param name=
"pattern"/>
97 <xsl:param name=
"replace"/>
99 <xsl:when test=
"contains($input, $pattern)">
100 <xsl:value-of select=
"substring-before($input, $pattern)"/>
101 <xsl:value-of select=
"$replace"/>
102 <xsl:call-template name=
"replace">
104 name=
"input" select=
"substring-after($input, $pattern)"/>
105 <xsl:with-param name=
"pattern" select=
"$pattern"/>
106 <xsl:with-param name=
"replace" select=
"$replace"/>
110 <xsl:value-of select=
"$input"/>
115 <xsl:template name=
"replacetwo">
116 <xsl:param name=
"input"/>
117 <xsl:param name=
"pattern1"/>
118 <xsl:param name=
"replace1"/>
119 <xsl:param name=
"pattern2"/>
120 <xsl:param name=
"replace2"/>
122 <xsl:when test=
"contains($input, $pattern1)">
123 <xsl:call-template name=
"replace">
125 name=
"input" select=
"substring-before($input, $pattern1)"/>
126 <xsl:with-param name=
"pattern" select=
"$pattern2"/>
127 <xsl:with-param name=
"replace" select=
"$replace2"/>
129 <xsl:value-of select=
"$replace1"/>
130 <xsl:call-template name=
"replacetwo">
132 name=
"input" select=
"substring-after($input, $pattern1)"/>
133 <xsl:with-param name=
"pattern1" select=
"$pattern1"/>
134 <xsl:with-param name=
"replace1" select=
"$replace1"/>
135 <xsl:with-param name=
"pattern2" select=
"$pattern2"/>
136 <xsl:with-param name=
"replace2" select=
"$replace2"/>
140 <xsl:call-template name=
"replace">
142 name=
"input" select=
"$input"/>
143 <xsl:with-param name=
"pattern" select=
"$pattern2"/>
144 <xsl:with-param name=
"replace" select=
"$replace2"/>