我有一個for-each,當沒有任何輸出時,我想顯示一些默認文本。for-each no results text
如果我有...
<xsl:for-each select='xpath'> Some content for each matching element result. </xsl:for-each>
我想的是:
<xsl:for-each select='xpath'>
<xsl:output-this-when-there-is-content> Some content for each matching element result. </xsl:output-this-when-there-is-content>
<xsl:no-results-output> Some content for when the for-each finds no matches. </xsl:no-results-output>
</xsl:for-each>
誰能告訴我如何做到這一點,好嗎?
感謝,
馬特
對不起,我不夠具體。如果我有... 每個匹配元素的結果都有一些內容。 的xsl:for-each>的 我想是: <的xsl:for-每個選擇= '的xpath'> 的 一些內容爲每個匹配元素結果。 xsl:output-this-when-is-content> for-each找不到匹配項時的一些內容。 xsl:no-results-output> xsl:for-each> –
2009-10-30 11:06:23