summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-30 12:36:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:42 +0100
commitb9fbb89eab7ea1f7b5e7b65c95d39f6d67fb269a (patch)
tree514582bb0b63724023eefb3187c18284799f56b5
parente6bbc419eced230056007d4f478fe0b43d1648ee (diff)
substring-before doesn't do what I want, tokenize instead
Change-Id: Id1c05366c429760780ece462db0ad1908fc19da1
-rw-r--r--solenv/bin/uilangfilter.xslt7
1 files changed, 4 insertions, 3 deletions
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
index bf58014d1159..a202b0e96637 100644
--- a/solenv/bin/uilangfilter.xslt
+++ b/solenv/bin/uilangfilter.xslt
@@ -7,7 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:str="http://exslt.org/strings">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
@@ -19,7 +20,7 @@
<xsl:template match="*/*[not(self::col)][@translatable]">
<xsl:text> </xsl:text>
- <t r="string" g="{substring-before(../@id,':')}" l="{@name}">
+ <t r="string" g="{str:tokenize(../@id,':')[1]}" l="{@name}">
<xsl:copy-of select="text()" />
</t><xsl:text>&#10;</xsl:text>
</xsl:template>
@@ -27,7 +28,7 @@
<xsl:template match="col">
<xsl:text> </xsl:text>
<xsl:variable name="groupid" select="../../../@id"/>
- <t r="stringlist" g="{substring-before($groupid,':')}" l="{count(preceding::col[../../../@id=$groupid])}">
+ <t r="stringlist" g="{str:tokenize($groupid,':')[1]}" l="{count(preceding::col[../../../@id=$groupid])}">
<xsl:copy-of select="text()" />
</t><xsl:text>&#10;</xsl:text>
</xsl:template>