是否有像tab-index这样的属性?
背景:我正在使网页表单中的某个部分可见或不可见,具体取决于我希望在特定部分可见时手动设置制表符索引的某些条件.
我想根据XML中的内容动态地在表中创建行.在下面的代码中,我试图创建一个<tr>包含5列的row().填充5列后,我想创建一个新行.
根据以下代码,行只能包含5列.如果我在XML上应用XSL,则会显示错误
XSLT编译错误.第574行的'tr'开始标记与'xsl:when'的结束标记不匹配.第578行,第7位.
570:<table>
571: <xsl:for-each select="/alert/account_links/account_links_info">
572: <xsl:choose>
573: <xsl:when test="position() mod 5 = 1">
574: <tr>
575: <td>
576: <xsl:value-of select="account_id"/>
577: </td>
578: </xsl:when>
579: <xsl:when test="position() mod 5 = 0">
580: <td>
581: <xsl:value-of select="account_id"/>
582: </td>
583: </tr>
584: </xsl:when>
585: <xsl:otherwise>
586: <td>
587: <xsl:value-of select="account_id"/>
588: </td>
589: </xsl:otherwise>
590: </xsl:choose>
591: </xsl:for-each>
592: </table>
Run Code Online (Sandbox Code Playgroud)
输入Xml:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<alert>
<account_links>
<account_links_info>
<account_id>1</account_id>
</account_links_info>
<account_links_info>
<account_id>2</account_id>
</account_links_info>
<account_links_info>
<account_id>3</account_id>
</account_links_info> …Run Code Online (Sandbox Code Playgroud) <attributes>
<attribute name="Mail Zone" property="alerts.p45" type="">
<value>mailzone</value>
</attribute>
<attribute name="Employee Name" property="acm_alert_custom_attributes.cs11" type="">
<value>employeename</value>
</attribute>
<attribute name="Manager Name" property="alerts.p23" type="">
<value><managername></value>
</attribute>
Run Code Online (Sandbox Code Playgroud)
如何<value>使用XPath基于上述XML的属性"name" 选择节点?