我想設置屬性REF_ID與「_0」後綴分隔變量名,但如何在一個字符串
<xsl:attribute name="ref_id" select="$id_0" />
被解析爲變量名:ID_0,而不是變量名ID,加上字符串_0。
如何釘上這一個?
謝謝!
我想設置屬性REF_ID與「_0」後綴分隔變量名,但如何在一個字符串
<xsl:attribute name="ref_id" select="$id_0" />
被解析爲變量名:ID_0,而不是變量名ID,加上字符串_0。
如何釘上這一個?
謝謝!
<xsl:attribute name="ref_id" select="concat($id, '_0')" />
<xsl:attribute name="ref_id"><xsl:value-of select="$id"/>_0</xsl:attribute>
當然,如果在xsl:屬性是文字結果元素的一個孩子,那麼你可以做
<e ref_id="{$id}_0">