The first handles errors globally
|
|
---|
<xsl:import href=”xsql-error.xsl”/>
Notice that you are doing an import this time, not an include. The reasoning is that you can override the default template on a page-by-page basis. For instance, if this error comes up in prod-search.xsl, you know that it was caused by a bad search string. You can put the following template in prod-search.xsl to handle the error:
Building XSQL Web Applications | 441 |
---|
Hey! Don’t use single quotes in your searches. They aren’t allowed.
</xsl:template>
Figure 14.17 Default behavior with error handling template.