Как скрыть тег данных - PullRequest
0 голосов
/ 25 июня 2019

Я хочу, чтобы в HiddenData был тег Unerline

<ShortNote>
<CatchWord pos="1">Human and Civil Rights</CatchWord> &#8212; <CatchWord pos="2"><HiddenData>#Right to Information, Confidential Information and Data Protection &#8212; </HiddenData></CatchWord><CatchWord pos="3"><HiddenData># </HiddenData>Right to Information Act, 2005</CatchWord>
</ShortNote>

I'm Try следующий код: -

<xsl:template match="ShortNote">
    <xsl:text>&#xA;</xsl:text>
    <xsl:for-each select="CatchWord/tokenize(., '&#8212;')">
        <xsl:element name="SNHeading{position()}">
            <xsl:value-of select="normalize-space(.)"/>
        </xsl:element>
    </xsl:for-each>
  </xsl:template>

my Вывод следующего кода: -

<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>
...