Hi Andre,
sorry to take so long in replying to your second question. There is no way
to configure Xalan to print only the message without stylesheet location
information.

I can imagine situations where one might want to issue the message as it
is. So the way to proceed on this is to open a JIRA issue requesting a new
feature.  Have a look at this page:
http://xml.apache.org/xalan-j/bugreporting.html

At the bottom of that page is a link to JIRA, our bug/issue tracking
system.  In small font on JIRA, in the top right corner you will see "Log
In" to log in and create an issue that has a type of "New Feature".  If you
don't already have a JIRA account you can make one.

- Brian
- - - - - - - - - - - - - - - - - - - -
Brian Minchau, Ph.D.
XSLT Development, IBM Toronto
(780) 431-2633
e-mail:        [EMAIL PROTECTED]

----- Forwarded by Henry Zongaro/Toronto/IBM on 2006-11-13 09:11 AM -----
                                                                       
             "andre\.mercadier                                         
             "                                                         
             <andre.mercadier@                                          To
             laposte.net>              "xalan-j-users"                 
                                       <xalan-j-users@xml.apache.org>  
             2006-11-07 07:15                                           cc
             AM                                                        
                                                                   Subject
                                       Re: How to avoid <xsl:message>  
                                       instruction prints stylesheet file
                                       informations ?                  
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       




Thanks, but I'm using Xalan with the command-line utility ...

So, how can I configure Xalan (or Xerces) to print only my
message, without stylesheet informations ?

Thanks a lot.



> Hi André,
>
> You could write your own error listener such as the following:
>
>         public class MyErrorListener implements ErrorListener {
>                 public void warning(TransformerException
exception) throws
> TransformerException {
>
System.err.println(exception.getMessage());
>                 }
>
>                 public void error(TransformerException
exception) throws
> TransformerException {
>  System.err.println(exception.getMessageAndLocation());
>                 }
>
>                 public void fatalError(TransformerException
exception)
> throws TransformerException {
>  System.err.println(exception.getMessageAndLocation());
>                 }
>         }
>
> To set the error listener on the transformer use the method:
> Transformer.setErrorListener(ErrorListener)
>
> Thanks.
>
> Erin Harris
>
>
>
>
>
> André Mercadier <[EMAIL PROTECTED]>
> 28/10/2006 04:22 AM
>
> To
> <xalan-j-users@xml.apache.org>
> cc
>
> Subject
> How to avoid <xsl:message> instruction prints stylesheet
file informations
> ?
>
>
>
>
>
>
> Hello,
>
> I'm using Xalan 2.7.0 with Xerces 2.7.1 on a MS-DOS
environment with the
> command line utility to perform XSLT transformations (java
> org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT
foo.out -PARAM
> param value).
>
> My foo.xsl stylesheet contains several <xsl:message>STEP
xxx</xsl:message>
> to trace the steps it reaches, but the printed message is
not only "STEP
> xxx" but :
>
> "file:///c:/my_very_complex_directory/foo.xsl ; Line x;
Column y; STEP xxx
> ".
>
> Is it possible to avoid the stylesheet file informations
(which don't
> interest users), keeping only the message in the
<xsl:message> tag ?
>
> Thanks a lot.
>



Accédez au courrier électronique de La Poste
sur www.laposte.net ou sur 3615 LAPOSTENET (0,34? TTC /mn)
1 Giga de stockage gratuit ? Antispam et antivirus intégrés




Reply via email to