0
我有以下input元素:如何用jquerys data()方法在XSLT中替換自定義屬性?
<input type="radio">
<xsl:attribute name="name">
<xsl:value-of select="../../os:Row_ID "/>
</xsl:attribute>
<xsl:attribute name="row_id">
<xsl:value-of select="../../os:Row_ID "/>
</xsl:attribute>
<xsl:attribute name="column_id">
<xsl:value-of select="os:Column_ID "/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="../../os:Row_ID "/>
<xsl:value-of select="os:Column_ID "/>
</xsl:attribute>
</input>
使用自定義屬性,不要在W3C驗證得到驗證相反的,我想用jQuerys數據()方法:
<xsl:attribute name="row_id">
<xsl:value-of select="../../os:Row_ID "/>
</xsl:attribute>
<xsl:attribute name="column_id">
<xsl:value-of select="os:Column_ID "/>
所以我可以添加「row_id」作爲關鍵字,並將值<xsl:value-of select="../../os:Row_ID "/>
作爲值。
如何在XSLT中完成此操作?
他想用jquery繞過驗證 –
@ neu-rah'data-'屬性在HTML5中是有效的,並且它們在HTML4中沒有任何問題。就我個人而言,我不在乎W3C驗證者是否抱怨他們。 – Tomalak
爲用戶代碼已經工作(即使詳細) –