I need XSLT to stop processing with an error, when an external document is not available. From what I've found out the <xsl:message> tag seems to be the right way to do it, but so far it doesn't work. Here's what I tried:
<xsl:if test="not(document('some_external_doc.xml')//myxpath)">
<xsl:message terminate="yes">ERROR: Missing element!</xsl:message>
<h1>Error detected!</h1>
</xsl:if>
The missing document/xpath is detected by the <xsl:if> and the <h1> will be displayed, but for some reason the terminate attribute of the <xsl:message> is ignored. The transformation is done in Railo, so the XSLT processor use should be the Java default, but I wasn't able to find something definitive about the processor Railo is using.