We are using XSLT stylesheets to extract data from a large XML file and write it to a CSV file.
The code to write out the value to CSV typically looks like this:
...
<xsl:value-of select="$quote"/>
<xsl:value-of select="pbs:code"/>
<xsl:value-of select="$quote"/>
<xsl:value-of select="$delimiter"/>
...
I would really like the transformation to fail if the input XML is not in the expected format. Is there any way to force the transformation to fail if there are elements missing (i.e. elements that the stylesheet is expecting)?