我在使用xsl 處理xml文件時,想要如果是 Href 的值不包含 .aspx ,則顯示成 藍色:
<TreeNode Title="功能名稱" Href="aaa.aspx" />
但使用以下代碼出錯:
<xsl:choose>
<xsl:when test="not contains(TreeNode/[@Href],'.aspx')">">
<xsl:attribute name="style">color: #0000FF</xsl:attribute>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
請問應如何寫?
<TreeNode Title="功能名稱" Href="aaa.aspx" />
但使用以下代碼出錯:
<xsl:choose>
<xsl:when test="not contains(TreeNode/[@Href],'.aspx')">">
<xsl:attribute name="style">color: #0000FF</xsl:attribute>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
請問應如何寫?
使用 objXSLDoc = new ActiveXObject("Microsoft.XMLDOM"); 出錯
改成 objXSLDoc = new ActiveXObject("MSXML2.DOMDocument.3.0"); 問題解決