Hi Dave,

thank you for your answer! In the meantime I tried both versions:
XalanTranformer::setWarningStream() worked fine, but finally I will need a
ProblemListener. Therefore I derived a class from the
XalanTransformerProblemListener and reimplemented the problem() method � at
least I tried to do so. To get information from the input parameter I
searched for a while how to convert a XalanDOMString and a XalanDOMChar to a
std::string. 
Now there is another question:
my application ends up in the catch block  I enclosed the transform()-method
of the XalanTransformer in caused by an assignment from XalanDOMChar to
XalanDOMString (as I found out):

XalanDOMString& dom_str_uri  =  dom_str_uri.assign(_uri);  

Where _uri is the input parameter from the problem() function of the derived
ProblemListener class. But I simply have no clue why it does so. Do I use
the wrong function?

Thanks again for any help!

Bettina


> > is there a possibility to redirect a text message
> > from the element xsl:message to a file instead of
> > stderr? I validated an xml file against a W3C Schema
> > and afterwards – in order to do additional checking
> > – against a stylesheet. The validation errors from
> > the Xerces parser are written to a file (by use of
> > a derived class of the DefaultHandler) and I would
> > like to append the error messages which I defined in
> > the stylesheet between the <xsl:message> tags to the
> > already created file. Is there a class for Xalan to
> > register with the XalanTransformer similar to the
> > behaviour of the DefaultHandler class?
> 
> If you set your own derivative of ProblemListener, using 
> XalanTransformer::setProblemListener(), you can re-direct messages, 
> warnings, and errors.  However, you will be responsible for the display of
> any diagnostic output if you do this.
> 
> If you just want simple re-direction of warnings and messages, you can set
> and instance of std::ostream, by calling 
> XalanTranformer::setWarningStream().  Again, this interrupts the normal 
> display of diagnostic output (except errors), so you will be responsible 
> for displaying messages or warnings.
> 
> Dave

-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++

Reply via email to