turugina #6943(2008/08/03 08:27 GMT) [ XSLT ] Rating0/0=0.00
XSLTもGolfには向きませんね。 本当は改行も全部消したかったんですが、 表示がエライことになるので止めました。 入力は↓のコード自身です。
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>
</x:text> </x:template> </x:transform>
Rating0/0=0.00-0+
[ reply ]
turugina
#6943()
[
XSLT
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]