My code generates the following XML:
<person_app>
<person_data>
<person>
...person details here...
</person>
</person_data>
</person_app>
Using XSLT, I parse the person records as follows:
<xsl:template match="/person_app/person_data">
<xsl:for-each select="person">
...generate person HTML...
</xsl:for-each>
</xsl:template>
However, in cases when I receive zero people, I'd like to display "No records found" (or something similar). When the app returns zero records, the XML resembles the following:
<person_app/>
Long story short, how can I test for an empty result set when I use <xsl:for-each/> to parse my Person records? I've tried the following with no success:
<xsl:if test="not(person)">
<div style="font-size:18pt"><xsl:text>No records found</xsl:text></div>
</xsl:if>