我的xml输入如下:-
<CatchWordPara>— aaaaa — <HiddenData>+</HiddenData>bbbbb — ccccc<HiddenData> — + ddddd — #eeeee#</HiddenData> — <HiddenData>#</HiddenData>fffff</CatchWordPara>
我的必需输出是:-
<SNItalic>aaaaa</SNItalic>
<CR>bbbbb — ccccc</CR>
<CR>ddddd — eeeee — fffff</CR>
使用以下代码:-
<xsl:template match="ShortNoteContinuePara">
<xsl:for-each select="for $s in CatchWordPara/tokenize(., '—') return normalize-space($s)">
<xsl:element name="SNItalic">
<xsl:value-of select="."/>
</xsl:element>
</xsl:for-each>
</xsl:template>