編輯Commerce Server產品詳細信息Web部件時,我們對XSLT模板進行更改時遇到了很大困難。這些並不是很複雜的變化,只是一些小的變化。這個模板沒有問題,因爲我已經在w3schools XSLT編輯器上試過了,它工作正常。在Commerce Server 2009 Web部件中保存XSLT模板
我將模板文本粘貼到對話框中,然後單擊「保存」以覆蓋模板。
我得到的錯誤「錯誤保存XSLT:{0}」
相反,如果我編輯對話框中的文本,而無需使用其他編輯器(和格式化,因爲所有CRLFs獲得剝奪),它的工作原理。
我在做什麼錯?
我希望你可以編輯提供的,因爲它有NO格式化
這裏的文本框外的文字是怎麼弄出來的文本框:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" version="1.0" indent="yes" /><xsl:template match="/products/product"><H1><xsl:value-of select="properties/property[@name='DisplayName']" /></H1></xsl:template></xsl:stylesheet>
爲一行。我想像這樣編輯它:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" indent="yes" />
<xsl:template match="/products/product">
<H1>
<xsl:value-of select="properties/property[@name='DisplayName']" />
</H1>
</xsl:template>
</xsl:stylesheet>
更好。
問得好(+1)。查看我的答案,瞭解簡單高效的XSLT解決方案。 – 2010-09-18 14:56:26