fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / officecfg / util / resource.xsl
blobd3b44ae679d3078ac4c0a31f8296e3ba89f85328
1 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2 <!--
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 .
18 -->
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"
24 version="1.0">
26 <!-- Set correct output format -->
27 <xsl:output method="text" indent="no" encoding="UTF-8"/>
29 <xsl:param name="locale"/>
30 <xsl:param name="fallback-locale">en-US</xsl:param>
32 <xsl:namespace-alias stylesheet-prefix="xs" result-prefix="xs"></xsl:namespace-alias>
34 <!-- overwrite default rule for text & attribute nodes to be silent -->
35 <xsl:template match="text()|@*">
36 </xsl:template>
38 <!-- match root -->
39 <xsl:template match="/">
40 <xsl:apply-templates/>
41 </xsl:template>
43 <!-- match all elements that could possibly contain info elements -->
44 <xsl:template match="info/desc[@xml:lang=$locale]|info/label[@xml:lang=$locale]">
46 <!-- print TPF's path to current node -->
47 <xsl:for-each select="ancestor-or-self::*">
48 <xsl:if test="local-name(.)!='component-schema'"><xsl:value-of select="local-name(.)"/>
49 <xsl:choose>
50 <xsl:when test="@oor:name">[<xsl:value-of select="@oor:name"/>]</xsl:when>
51 <xsl:when test="@oor:value">[<xsl:value-of select="@oor:value"/>]</xsl:when>
52 </xsl:choose>
53 <xsl:if test="position()!=last()">.</xsl:if>
54 </xsl:if>
55 </xsl:for-each>
57 <!-- print separator (equals sign) -->
58 <xsl:text>=</xsl:text>
60 <!-- print info/desc|label element's content -->
61 <xsl:value-of select="normalize-space(.)"/>
63 <!-- print linefeed -->
64 <xsl:text>&#10;</xsl:text>
66 <xsl:apply-templates/>
68 </xsl:template>
70 </xsl:transform>