Thanks Dave. I am generating text output. So I will try to use extension funciton or adding error message to output string and termiating the transformation.
Thanks, Raj.. > -----Original Message----- > From: David N Bertoni/CAM/Lotus [SMTP:[EMAIL PROTECTED]] > Sent: Saturday, February 09, 2002 10:09 AM > To: [EMAIL PROTECTED] > Subject: RE: Returning message from xsl:message. > > > There is a small overhead for extension functions, since we have to > allocate and array to pass the args. There's also the same problem of > side-effects -- XSLT is considered a side-effect-free language, so things > can be optimized in such a way that can break your stylesheet. For > example. a function which takes no arguments can always be optimized out > of > the execution path. Likewise, functions which take constants as > arguments, > as well as function calls when the processor can determine that the > function has already been called with the same input, can be optimized > out. > > That means an extension function which takes identical inputs (including > no > input),and returns a different value is broken in the XSLT model. As a > result, we actively discourage extension functions which might break. > However, you can certainly try to make it work. You're much better off > generating such output to the result document, then processing those > results in a second step. For example, you could "annotate" the resulting > XML document with elements in a private namespace, and add the error > messages as the content of those elements. A second stage could process > those elements, perhaps removing them to produce the "true" output > document. Of course, if you're generating HTML, that won't work. > > Dave > > > > > > "Avula, Raj" > > <RAvula@firstam. To: > "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > > com> cc: > > Subject: RE: Returning > message from xsl:message. > 02/08/2002 02:18 > > PM > > Please respond > > to xalan-dev > > > > > > > > > > > Thanks for the relply Dave. I am using xalan1.2. > Now I am thinking of calling extension function > for each error. Do you think it is a good idea to do this? > Is the call to extension funciton expensive? > > --Thanks, > Raj.. > > > -----Original Message----- > > From: David N Bertoni/CAM/Lotus [SMTP:[EMAIL PROTECTED]] > > Sent: Friday, February 08, 2002 11:04 AM > > To: [EMAIL PROTECTED] > > Subject: Re: Returning message from xsl:message. > > > > > > Will Xalan-J may send xsl:message output to standard output, this is not > > true for Xalan-C++. > > > > The output destination for xsl:message in Xalan-C++ depends on how it's > > configured. The default for XalanTransformer is that output for > > xsl:message when terminate="no" is dropped. Output for xsl:message > > terminate="yes" appears on stderr. > > > > In general, you should not depend on xsl:message for anything except > that > > it will stop processing if terminate="yes". Read the XSLT > recommendation > > very carefully -- you will see that xsl:message is not guaranteed to > > produce any output at all (since such output can be considered a > > side-effect, and the processor may be running in an environment where > > output is not possible or useful). > > > > If you use the latest CVS code for Xalan-C++, you can create your own > > ProblemListener derivative to intercept messages, warnings, and errors > and > > install it into an instance of XalanTransformer. Of course, if you do > > this, you will interfere with XalanTransformer's normal error reporting > > mechanism, so the transformer may not be able to report error messages > as > > accurately. Right now, we don't have any mechanism for chaining > > ProblemListeners, but adding one would solve this problem. > > > > Dave > > > > > > > > > > > > Phil Friedman > > > > <pfriedma@terral To: > > [EMAIL PROTECTED] > > > > ink.com> cc: > > > > Subject: Re: Returning > > message from xsl:message. > > 02/08/2002 05:40 > > > > AM > > > > Please respond > > > > to xalan-dev > > > > > > > > > > > > > > > > > > > > Raj, > > > > <xsl:message> sends output to standard output, you'd have to > > redirect/read it there. > > > > yes, <xsl:message terminate="no"> will not terminate processing. > > > > There may be a better mechanism if you want your calling code to deal > > with the event. > > > > Regards, Philip Friedman -- Terralink Software Systems -- 207-772-6500 > > x101 > > > > On Thu, 7 Feb 2002 17:28:46 -0800, "Avula, Raj" <[EMAIL PROTECTED]> may > > have written: > > > > | > > |I am resending this message because I did not get any response to it. > > |How can I catch the message thrown by xsl:message template? > > |Does Xalan throughs any exception in case of xsl:message or > > |does it use different mechanism to catch the message. > > | > > |Thanks, > > |Raj.. > > | > > |> -----Original Message----- > > |> From: Avula, Raj > > |> Sent: Wednesday, February 06, 2002 12:10 PM > > |> To: '[EMAIL PROTECTED]' > > |> Subject: Returning message from xsl:message. > > |> > > |> > > |> Hi, > > |> I want to send error messages to xalan from the xsl file using > > |> xsl:message template. > > |> How can I catch those messages with in xalan. And Can I to use > > |> <xsl:message > > |> terminate="no"> > > |> where I can keep sending mulitple error messages to the C++ and go a > > head > > |> with xsl execution. > > |> I want to store all the error messages and form an exception at the > end > > of > > |> the processing. > > |> Please let me know How can I do this > > |> > > |> Thank You, > > |> Raj.. > > |> > > |> "MMS <firstam.com>" made the following > > |> annotations on 02/06/02 12:11:50 > > |> > > > -------------------------------------------------------------------------- > > |> ---- > > |> "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED > > |> SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN > > |> CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT > > THE > > |> ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF > > THIS > > |> MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR > DISTRIBUTE > > |> THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS > > |> MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND > DELETE > > |> THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM." > > |> > > |> > > > ========================================================================== > > |> ==== > > |> > > | > > |"MMS <firstam.com>" made the following > > | annotations on 02/07/02 17:30:04 > > > |------------------------------------------------------------------------- > > ----- > > > > |"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED > > SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN > > CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE > > ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS > > MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE > > THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS > > MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE > > THIS > > MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM." > > | > > > |========================================================================= > > ===== > > > > > > > > > > > > "MMS <firstam.com>" made the following > annotations on 02/08/02 14:20:05 > -------------------------------------------------------------------------- > ---- > > "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED > SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN > CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE > ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS > MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE > THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS > MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE > THIS > MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM." > > ========================================================================== > ==== > > > > "MMS <firstam.com>" made the following annotations on 02/12/02 15:30:36 ------------------------------------------------------------------------------ "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM." ==============================================================================
