Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to produce exception error while transformation processing between xml and xslt

Tags:

c#

xml

xslt

i am having a doubt when we are doing any process in c#.net on going if some thing error would may come at that time we are trapping in error log

similarly when suppose we are doing any process between xml and xslt on processing error would may come at that how we can trap that exceptions!

can any one have an idea... because it will use for validations for me so , kindly let me know any possibilities for that.

like image 262
pravz Avatar asked Aug 20 '11 04:08

pravz


1 Answers

You can use xsl:message.

The xsl:message instruction sends a message in a way that is dependent on the XSLT processor. The content of the xsl:message instruction is a template. The xsl:message is instantiated by instantiating the content to create an XML fragment. This XML fragment is the content of the message.

NOTE:An XSLT processor might implement xsl:message by popping up an alert box or by writing to a log file.

If the terminate attribute has the value yes, then the XSLT processor should terminate processing after sending the message. The default value is no.

<xsl:message
  terminate = "yes">
  <!-- Content: message describing the error -->
</xsl:message>
like image 131
Mads Hansen Avatar answered Nov 03 '22 16:11

Mads Hansen