4 ユーザー定義関数 XSLTにおいても、他のプログラミング言語と同じく、ソースが大きくなればなるほど、メンテナンスを容易にするために処理を部分に分割する必要があります。そのために、XSLT1.0では名前付きテンプレート(xsl:template name)を使います。 ある文字列にカッコを付加する(fooを(foo)にする)ルーチンを考えます。XLST1.0で実装すると以下のようになります。 <xsl:template name="AddParentheses"> <xsl:param name="s"/> <xsl:value-of select="concat('(',$s,')')"/> </xsl:template> <xsl:template name="Foo"> <output> <xsl:call-template name="AddParentheses"> <xsl: