【发布时间】:2017-02-27 05:44:35
【问题描述】:
当超链接末尾出现“#”符号时,我想删除它。
我的输入 xml 是:
<Uri>http://www.tneb.nih.gov/lifeafter#</Uri>
XSL 我用作:
<xsl:template match="Uri">
<xref format="html" href="{.}" outputclass="">
<xsl:value-of select="."/>
</xref>
</xsl:template>
我得到的输出为:
<xref format="html"
href="http://www.tneb.nih.gov/lifeafter#"
outputclass="">http://www.tneb.nih.gov/lifeafter#</xref>
预期输出:
<xref format="html"
href="http://www.tneb.nih.gov/lifeafter"
outputclass="">http://www.tneb.nih.gov/lifeafter#</xref>
我需要删除“href”属性末尾的“#”符号。不与内部文本。请建议我为此编码。提前致谢。
【问题讨论】: