I have an XQuery return statement like:
return
<li>
<h3>{ string($TELECAST/title/maintitle) }</h3>
<h4>{ string($TELECAST/title/subtitle) }</h4>
<h5>{ string($TELECAST/title/description) }</h5>
</li>
Sometimes, there is no subtitle or description, still the HTML tags will be output. How can I easily check for empty strings and omit the unnecessary tags?
For example, like this: