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/.
10 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0"
11 xmlns:
str=
"http://exslt.org/strings">
12 <xsl:output method=
"xml" encoding=
"UTF-8"/>
14 <xsl:template match=
"/">
15 <l><xsl:text> </xsl:text>
17 What I want to do here is to extract all nodes that are translatable
18 except the columns of list and tree stores
20 <xsl:apply-templates select=
"//*[not(self::col)][@translatable='yes']" />
22 What I want to do here is to extract just the list and tree store
23 columns that are translatable (the first one only)
25 <xsl:apply-templates select=
"interface/object[data/row/col[@id='0'][@translatable='yes']]" />
32 <xsl:template match=
"*/*[not(self::col|self::item)][@translatable='yes']">
33 <xsl:text> </xsl:text>
34 <t r=
"string" g=
"{str:tokenize(../@id,':')[1]}" l=
"{@name}">
35 <xsl:copy-of select=
"text()" />
36 </t><xsl:text> </xsl:text>
42 <xsl:template match=
"*/*[self::item][@translatable='yes']">
43 <xsl:text> </xsl:text>
44 <xsl:variable name=
"groupid" select=
"../../@id"/>
45 <t r=
"stringlist" g=
"{str:tokenize(../../@id,':')[1]}" l=
"{count(preceding::item[../../@id=$groupid])}">
46 <xsl:copy-of select=
"text()" />
47 </t><xsl:text> </xsl:text>
53 <xsl:template match=
"col[@id='0'][@translatable='yes']">
54 <xsl:text> </xsl:text>
55 <xsl:variable name=
"groupid" select=
"../../../@id"/>
56 <t r=
"stringlist" g=
"{str:tokenize($groupid,':')[1]}" l=
"{count(preceding::col[@id='0'][../../../@id=$groupid])}">
57 <xsl:copy-of select=
"text()" />
58 </t><xsl:text> </xsl:text>
61 <xsl:template match=
"text()"/>