$content を期待される文字列にしたい。$content の value-of ではなく copy-of が予想される文字列を生成することはわかっています。しかし、copy-of を使用せずに渡して Java 拡張関数と言うにはどうすればよいでしょうか。
ここで別の関連する質問をしました。
XML
<?xml version="1.0"?>
<a>
<b c="d"/>
<b c="d"/>
<b c="d"/>
</a>
XSL
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="foo">
<xsl:param name="content"></xsl:param>
<!-- <xsl:copy-of select="$content"></xsl:copy-of> -->
<!-- copy-of produces the expected string here, but how to pass to Java -->
<xsl:value-of select="java:someMethod($content)" />
<!-- I want the content to be the expected string -->
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="foo">
<xsl:with-param name="content">
<xsl:for-each select="a/b">
<e>
<xsl:value-of select="@c" />
</e>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
$content から Java 拡張関数に渡す必要のある文字列。
<?xml version="1.0"?>
<e>d</e>
<e>d</e>
<e>d</e>
PS: foo の呼び出しは必須です。
最終的に、私の目的は、拡張機能を使用して XSLT 1.0 で結果ドキュメントをエミュレートすることです。