1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<x:transform version="2.0"
xmlns:x="http://www.w3.org/1999/XSL/Transform"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:f="http://www.w3.org/2005/xpath-functions">
<x:variable name="ll2008" as="s:string">LL future</x:variable>
<x:variable name="ll2005" as="s:string">LL day and night</x:variable>
<x:output method="text"/>
<x:template match="/">
<x:apply-templates select="/x:transform/x:variable"/>
</x:template>
<x:template match="x:variable">
<x:variable name="tokens" as="s:string*">
<x:for-each select="f:tokenize(./text(),' ')">
<x:sequence select="f:concat(f:upper-case(f:substring(.,1,1)),f:substring(.,2,f:string-length(.)-1))"/>
</x:for-each>
</x:variable>
<x:value-of select="f:concat(@name,'=')"/>
<x:value-of select="string-join($tokens,' ')"/>
<x:text>&#xA;</x:text>
</x:template>
</x:transform>