4
當試圖從網頁閱讀我的xml我得到:「錯誤:在第8行,列23:綁定前綴」 下面是我的xml:問題解析與XSL XML在它
<?xml version="1.0"?>
<outertag>
<innertag sampleattribute="innertagAttribute">
<Retailer>
RetailerName:
<xsl:template match="link">
<a href="LinkGoesHere">Link</a>
</xsl:template>
</Retailer>
</innertag>
關於什麼是錯的任何想法?我的xml中不能使用xsl:template嗎?任何幫助是極大的讚賞。
問得好,+1。請參閱我的回答以解釋問題以及一個簡單而簡短但完整的解決方案。 :) – 2011-01-23 07:09:01
隨後的對話顯示,「unbound prefix」錯誤只是一個症狀;問題的根本原因是您還沒有理解XSLT與XML的關係。簡單的答案是,如果您要將XML發送到瀏覽器,則不:您不能簡單地在XML中包含XSLT指令並期望它們被執行。 – 2011-01-23 18:24:53