If you just want the text then the simplest approach would be to apply the widow-fix templates to just the text node children of the solution-headline
element rather than to the element itself:
<xsl:apply-templates select="solution-headline/text()" mode="widow-fix" />
If you always want the widow-fixing to give you just the text and not include the surrounding element, then delete the existing template
<xsl:template match="* | @*" mode="widow-fix">
<xsl:copy>
<xsl:apply-templates select="@* | node()" mode="widow-fix"/>
</xsl:copy>
</xsl:template>
widow-fix テンプレートを適用すると、デフォルトのテンプレートsolution-headline
が使用されます。このテンプレートは基本的にを使用せずに(つまり、同じモードを使用してすべての子ノードを処理します) 、widow-fixing によって処理されたすべての子孫テキスト ノードを取得します。テンプレート。<xsl:apply-templates mode="widow-fix" />
copy