我的XSL不帶參數的工作XSL解析問題的,每個標籤
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="reportname" />
<xsl:param name="quarter" />
<xsl:param name="menteename" />
<xsl:template match="AllReports" >
<xsl:for-each select="./Report[@Name=$reportname]" >
<table border="0" class="dottedlines" cellpadding="2" cellspacing="0">
<xsl:for-each select="Record[@Period=$quarter] and ($menteename)] >
<tr>
<xsl:for-each select="Entry">
<td><xsl:value-of select="." disable-output-escaping="yes"/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
我的XSL與辛勤工作的編碼值
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="reportname" />
<xsl:param name="quarter" />
<xsl:param name="menteename" />
<xsl:template match="AllReports" >
<xsl:for-each select="./Report[@Name=$reportname]" >
<table border="0" class="dottedlines" cellpadding="2" cellspacing="0">
<xsl:for-each select="Record[@Period=$quarter] and (Entry= 'Dhirde, Govinda' or Entry= 'Vaze, Kedar')] >
<tr>
<xsl:for-each select="Entry">
<td><xsl:value-of select="." disable-output-escaping="yes"/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
我傳遞變量$ menteename的值=「輸入= 'Dhirde,Govinda'或Entry ='Vaze,Kedar'「。但硬編碼的東西效果不是參數之一。我發現XSL解析存在一些問題,它讀取參數值中的標記。這是否導致問題。我該如何做這項工作?
抱歉,上傳代碼我輸入了一個關閉']'額外。它不適用於並與 –
Govinda
2013-02-22 10:05:01