要素にテキストが散在する他の要素が含まれている場合、テキスト要素の順序を維持するにはどうすればよいですか? この (簡略化された) 例では:
<block>1st text<bsub>2nd text</bsub>3rd text</block>
目的の出力は次のとおりです。
"1st text 2nd text 3rd text"
私が試してみました:
<xsl:template match="block">
<xsl:value-of select=".">
<xsl:apply-templates select="bsub"/>
<xsl:value-of select=".">
</xsl:template>
<xsl:template match="bsub">
<xsl:value-of select=".">
</xsl:template>
そしてそれは出力します:
"1st text 2nd text 3rd text 2nd text 1st text 2nd text 3rd text"
<block>
を使用して (の)個々のテキスト要素を選択する方法は<xsl:value-of>
?