I'm using XSLT to return some values, output as XHTML. However I usually structure my XSL like this:
<div id="something">
call template=Something
</div>
The trouble is when the XML returned is empty , it just outputs:
<div id="something">
Empty set.
And as you can imagine this screws up my page.
Is there any function I can use to detect if there is any data there or not? Or can anyone think of a better way of stopping this开发者_高级运维 from happening.
I think you may be using
<xsl:output method="html" />
try
<xsl:output method="xml" />
instead.
It's just a dirty hack, but I had the same problem and I was in a hurry, so I ended using
<div id="something">
<span>call template=Something</span>
</div>
精彩评论