1.1 --- a/XSLForms/Output.py Fri Dec 02 23:33:36 2005 +0000
1.2 +++ b/XSLForms/Output.py Sat Dec 03 01:52:11 2005 +0000
1.3 @@ -324,10 +324,20 @@
1.4 Exposed as {template:i18n(value)}.
1.5
1.6 Provides a translation of the given 'value' using the 'translations' and
1.7 - 'locale' variables defined in the output stylesheet.
1.8 + 'locale' variables defined in the output stylesheet. The 'value' may be a
1.9 + string or a collection of nodes, each having a textual value, where such
1.10 + values are then concatenated to produce a single string value.
1.11 """
1.12
1.13 - value = unicode(value, libxml2_encoding)
1.14 + if isinstance(value, str):
1.15 + value = unicode(value, libxml2_encoding)
1.16 + else:
1.17 + l = []
1.18 + for node in value:
1.19 + s = libxml2dom.Node(node).nodeValue
1.20 + l.append(s)
1.21 + value = "".join(l)
1.22 +
1.23 context = libxml2mod.xmlXPathParserGetContext(context)
1.24 transform_context = libxsltmod.xsltXPathGetTransformContext(context)
1.25 translations_var = libxsltmod.xsltVariableLookup(transform_context, "translations", None)