Hi there - Can somebody give me some pointers on how I can create a
XSLT which will compile fine but will thow a runtime exception during
runtime.
I tried to do the following but it doesn't throw any runtime
exception.
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/
Transform'>
<xsl:template match='/'>
<xsl:variable name='a' select='1 div 0'/>
<xsl:copy-of select ='$a'/>
</xsl:template>
</xsl:stylesheet>
Thanks,
David
Dimitre Novatchev - 28 Feb 2007 01:54 GMT
> Hi there - Can somebody give me some pointers on how I can create a
> XSLT which will compile fine but will thow a runtime exception during
> runtime.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:call-template name="loop-for-ever"/>
</xsl:template>
<xsl:template name="loop-for-ever">
<xsl:call-template name="loop-for-ever"/>
</xsl:template>
</xsl:stylesheet>
Cheers,
Dimitre Novatchev
> Hi there - Can somebody give me some pointers on how I can create a
> XSLT which will compile fine but will thow a runtime exception during
[quoted text clipped - 15 lines]
>
> David
Martin Honnen - 28 Feb 2007 13:01 GMT
> Hi there - Can somebody give me some pointers on how I can create a
> XSLT which will compile fine but will thow a runtime exception during
> runtime.
Look into xsl:message, see <http://www.w3.org/TR/xslt#message>
<xsl:message terminate="yes">Your exception</xsl:message>
Or is that not what you are looking for?

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
IAMDkg@gmail.com - 28 Feb 2007 23:52 GMT
> IAM...@gmail.com wrote:
> > Hi there - Can somebody give me some pointers on how I can create a
[quoted text clipped - 9 lines]
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
Thanks Martin. It works :)