Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 10:25 PM
IAMDkg@gmail.com
Guest
 
Posts: n/a
Default Need XSLT to throw Runtime Exception

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

  #2  
Old February 28th, 2007, 02:05 AM
Dimitre Novatchev
Guest
 
Posts: n/a
Default Re: Need XSLT to throw Runtime Exception

<IAMDkg@gmail.comwrote in message
news:1172614146.355065.290670@8g2000cwh.googlegrou ps.com...
Quote:
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


<IAMDkg@gmail.comwrote in message
news:1172614146.355065.290670@8g2000cwh.googlegrou ps.com...
Quote:
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
>

  #3  
Old February 28th, 2007, 01:15 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Need XSLT to throw Runtime Exception

IAMDkg@gmail.com wrote:
Quote:
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?

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
  #4  
Old March 1st, 2007, 12:05 AM
IAMDkg@gmail.com
Guest
 
Posts: n/a
Default Re: Need XSLT to throw Runtime Exception

On Feb 28, 5:01 am, Martin Honnen <mahotr...@yahoo.dewrote:
Quote:
IAM...@gmail.com wrote:
Quote:
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?
>
--
>
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Thanks Martin. It works :)

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles