如何从字符串中删除连字符 +xslt

how to remove hyphen from string +xslt

如何从“19650512-0065”到“196505120065”等字符串中删除连字符

使用此模板:传递 ID =

   <xsl:template name="unformatLFPartyID">
        <xsl:param name="theID" select="." />

        <xsl:variable name="idSuffix" select="string-length($theID) - 3" />

        <xsl:choose>
            <xsl:when test="contains($theID,'-')">
                <xsl:value-of select="substring($theID,0,$idSuffix)" />
                <xsl:value-of select="substring($theID, $idSuffix)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$theID" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template> 

尝试将 xsl:variable 和整个 xsl:choose 替换为:

<xsl:value-of select="translate($theID,'-','')"/>