Hi HolgeR,

Can't you just call XalanTransformer::compileStylesheet() to the compile
the stylesheet when necessary?  Don't you already have some conditional
logic in your code to handle the two cases anyway?  Or am I not
understanding your question?

Another way to do this would be to derive a class from Xalan's Writer
class, which can be used to construct an XSLTResultTarget, although I'd not
recommend doing it unless you can't get the callback to work.

Dave



                                                                                       
                                              
                      Holger Floerke                                                   
                                              
                      <floerke@doctron         To:      [EMAIL PROTECTED]       
                                              
                      ic.de>                   cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                         
                                               Subject: Re: Xalan-C: Two Ways to 
Transform into ByteStream                           
                      07/23/2002 03:16                                                 
                                              
                      AM                                                               
                                              
                      Please respond                                                   
                                              
                      to xalan-dev                                                     
                                              
                                                                                       
                                              
                                                                                       
                                              




>I would not recommend tranforming to a XalanDOMString then casting every
>character to a narrow character.
It looks aweful...I know...

>Another is to use the callback mechanism to write the data to your own
>buffer. See the XalanTransformerCallback sample for more information.
I tried to use TransformerCallback to do preallocating on my own.
Unfortunatly I use XercesDOMWrappedSource as document input and both
XalanCompiledStylesheet and XSLTInputSource(istrstream) as stylesheet
input. There is only one "transform" method for XalanTransformer with
XalanParsedSource as document input, compiled stylesheet, and callback
handler.

Should I compile the istrstream-stylesheet everytime? Or is there a way to
pass XalanParsedInputSource as a simple XSLTInputSource to use another
method?

HolgeR



--
holger floerke                     d  o  c  t  r  o  n  i  c
email [EMAIL PROTECTED]         information publishing + retrieval
phone +49 2222 9292 90             http://www.doctronic.de




Reply via email to