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"/>
28 <!-- Get the correct format -->
29 <xsl:output method=
"xml" indent=
"yes"/>
30 <xsl:namespace-alias stylesheet-prefix=
"xs" result-prefix=
"xs"></xsl:namespace-alias>
33 <!-- Remove all comments from the schema files -->
34 <xsl:template match=
"*|@*">
36 <xsl:apply-templates select=
"*|@*"/>
40 <!-- suppress the location of the schema -->
41 <xsl:template match =
"@xsi:schemaLocation"/>
43 <!-- suppress the constraints of the schema
44 <xsl:template match = "constraints"/> -->
46 <!-- suppress all documentation items
47 <xsl:template match = "info"/> -->
49 <!-- suppress constraints for deprecated items -->
50 <xsl:template match =
"constraints[../info/deprecated]"/>
52 <!-- suppress all documentation for deprecated items -->
53 <xsl:template match =
"desc[../deprecated]"/>
54 <xsl:template match =
"label[../deprecated]"/>
56 <!-- copy all other documentation with content -->
57 <xsl:template match=
"desc|label">
59 <xsl:apply-templates select=
"@*"/>
60 <xsl:value-of select=
"."/>
64 <!-- suppress all author items -->
65 <xsl:template match =
"author"/>
67 <!-- suppress values, which are marked as nil -->
68 <xsl:template match=
"value[@xsi:nil='true']" />
70 <!-- copy all other values with content -->
71 <xsl:template match=
"value">
73 <xsl:apply-templates select=
"@*|node()"/>
77 <xsl:template match =
"it|unicode">
79 <xsl:apply-templates select =
"@*|node()"/>
83 <xsl:template match=
"text()">
84 <xsl:call-template name=
"replace">
85 <xsl:with-param name=
"input" select=
"current()"/>
86 <xsl:with-param name=
"pattern" select=
"'@LIBO_SHARE_FOLDER@'"/>
87 <xsl:with-param name=
"replace" select=
"$LIBO_SHARE_FOLDER"/>
91 <xsl:template name=
"replace">
92 <xsl:param name=
"input"/>
93 <xsl:param name=
"pattern"/>
94 <xsl:param name=
"replace"/>
96 <xsl:when test=
"contains($input, $pattern)">
97 <xsl:value-of select=
"substring-before($input, $pattern)"/>
98 <xsl:value-of select=
"$replace"/>
99 <xsl:call-template name=
"replace">
101 name=
"input" select=
"substring-after($input, $pattern)"/>
102 <xsl:with-param name=
"pattern" select=
"$pattern"/>
103 <xsl:with-param name=
"replace" select=
"$replace"/>
107 <xsl:value-of select=
"$input"/>