1

description/@text 有一个包含 .dot 的句子,我想用空格替换它。

            <xsl:call-template name="playByPlayJson">
                <xsl:with-param name="sequenceNumber" select="position()"/>

        <xsl:with-param name="summaryPhrase" select="description/@text"/>
        <xsl:with-param name="outs" select="@outs-aft"/>
                <xsl:with-param name="baseSit" select="@base-sit-aft"/>
                <xsl:with-param name="hasScored" select="@scored"/>
                <xsl:with-param name="hasOutOccured" select="@outs-aft - @outs-bef &gt; 0"/>
                <xsl:with-param name="inning" select="../inning/@number"/>
                <xsl:with-param name="inningHalves" select="substring(../inning/@half, 1, 1)"/>
                <xsl:with-param name="awayScore" select="@vis-score"/>
                <xsl:with-param name="homeScore" select="@home-score"/>
                <xsl:with-param name="eventAt" select="$eventAt"/>
                <xsl:with-param name="type" select="@id"/>
            </xsl:call-template>

            <xsl:if test="$eventAt = ''">
                <xsl:if test="position() != last()">,</xsl:if>
            </xsl:if>
        </xsl:for-each>
    <xsl:text>]</xsl:text>  
4

1 回答 1

2

尝试;

<xsl:with-param name="summaryPhrase" select="translate(description/@text,'.',' ')"/>
于 2012-10-31T15:05:10.790 回答