我要HiddenData应该是Unerline标签
<ShortNote>
<CatchWord pos="1">Human and Civil Rights</CatchWord> — <CatchWord pos="2"><HiddenData>#Right to Information, Confidential Information and Data Protection — </HiddenData></CatchWord><CatchWord pos="3"><HiddenData># </HiddenData>Right to Information Act, 2005</CatchWord>
</ShortNote>
我正在尝试以下代码:-
<xsl:template match="ShortNote">
<xsl:text>
</xsl:text>
<xsl:for-each select="CatchWord/tokenize(., '—')">
<xsl:element name="SNHeading{position()}">
<xsl:value-of select="normalize-space(.)"/>
</xsl:element>
</xsl:for-each>
</xsl:template>
我的输出如下代码:-
<SNHeading1>Human and Civil Rights</SNHeading1><SNHeading2>#Right to Information, Confidential Information and Data Protection</SNHeading2><SNHeading3></SNHeading3><SNHeading4>#Right to Information Act, 2005</SNHeading4>
但需要输出:-
<SNHeading1>Human and Civil Rights</SNHeading1><SNHeading2><u>#Right to Information, Confidential Information and Data Protection</u></SNHeading2><SNHeading3></SNHeading3><SNHeading4><u>#</u>Right to Information Act, 2005</SNHeading4>