我有一个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