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 .
20 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
21 exclude-result-prefixes=
"uc"
22 xmlns=
"http://openoffice.org/2010/uno-components"
23 xmlns:
uc=
"http://openoffice.org/2010/uno-components">
24 <xsl:param name=
"uri"/>
25 <xsl:param name=
"cppu_env"/>
26 <xsl:param name=
"filtered"/>
27 <xsl:strip-space elements=
"*"/>
28 <xsl:template match=
"uc:component">
31 <xsl:apply-templates select=
"@*"/>
32 <xsl:attribute name=
"uri">
33 <xsl:value-of select=
"$uri"/>
35 <xsl:apply-templates/>
39 <xsl:template match=
"uc:implementation">
40 <xsl:if test=
"not(contains($filtered,@name))">
42 <xsl:apply-templates select=
"@*"/>
43 <xsl:apply-templates select=
"uc:optional"/>
44 <xsl:apply-templates/>
48 <xsl:template match=
"uc:optional"/>
49 <xsl:template match=
"*">
51 <xsl:apply-templates select=
"@*"/>
52 <xsl:apply-templates/>
55 <xsl:template match=
"@environment">
56 <xsl:attribute name=
"environment">
57 <xsl:call-template name=
"replace">
58 <xsl:with-param name=
"input" select=
"current()"/>
59 <xsl:with-param name=
"pattern" select=
"'@CPPU_ENV@'"/>
60 <xsl:with-param name=
"replace" select=
"$cppu_env"/>
64 <xsl:template match=
"@*">
67 <xsl:template name=
"replace">
68 <xsl:param name=
"input"/>
69 <xsl:param name=
"pattern"/>
70 <xsl:param name=
"replace"/>
72 <xsl:when test=
"contains($input, $pattern)">
73 <xsl:value-of select=
"substring-before($input, $pattern)"/>
74 <xsl:value-of select=
"$replace"/>
75 <xsl:call-template name=
"replace">
77 name=
"input" select=
"substring-after($input, $pattern)"/>
78 <xsl:with-param name=
"pattern" select=
"$pattern"/>
79 <xsl:with-param name=
"replace" select=
"$replace"/>
83 <xsl:value-of select=
"$input"/>