[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Throw Exception When the node contains invalid for
Subject: Re: Throw Exception When the node contains invalid for that context in XSLT to Java
From: Senthilkumaravelan Krishnanatham <senthil@xxxxxxxxx>
Date: Thu, 29 Mar 2007 12:06:54 -0700
|
I found a way get my xsl:message by implementing ErrorListener during
transformation.
I use XALAN for my transformation.
In the ErrorLisneter the message is being captured by the warning
method in it.
Thanks for your input and the directions in this regard.
On Mar 29, 2007, at 11:54 AM, Abel Braaksma wrote:
Senthilkumaravelan Krishnanatham wrote:
You mean error method in Errorlistner, during the xsl:message
terminate =yes ,it is not throwing any exception.
No, Florent means the same I wrote earlier in response to this
thread: the error() XPath 2.0 function. It will raise an XPath
exception.
terminate="yes" will terminate your transformation. I don't believe
it says anything about throwing an exception. You can check the
Saxon documentation (if you use Saxon) in how to respond to
messages. I am not sure if you can "catch" whether the message is
send with a terminate="yes", I remember a thread in the Saxon list
about it a while ago, that says that it is not possible: https://
sourceforge.net/mailarchive/forum.php?thread_name=458FC5FE.80609%
40i-hypergrid.com&forum_name=saxon-help.
But this gets Saxon specific. Better ask it on the Saxon list.
I am still struggling to get the exception part of it.
who said there's an exception? It is written to System.err. That's
all.
On Mar 29, 2007, at 3:53 AM, Florent Georges wrote:
error() can be of help too, depending on the real requirements.
Regards,
--drkm
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|