You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Art Welch <ar...@EASTPOINT.COM> on 2000/05/17 00:56:38 UTC

RE: Is it possible to make an XSLTProcessor function as a Documen tHandler?

Just a point... Currently event though you are feeding it SAX events, it
will result in the creation of a DOM which will then be processed when the
endDocument is received. Scott and others are working on changes to address
this in 2.0 (light weight high performance DOM I believe) which I am eagerly
anticipating (sounds like great stuff). But if your immediate concern is
multiple DOMs, currently the DocumentHandler interface will not help -
although it should prepare you for the new stuff when it is available.

> -----Original Message-----
> From:	Sobeck, David [SMTP:david.sobeck@thinklinkinc.com]
> Sent:	Tuesday, May 16, 2000 6:06 PM
> To:	'xalan-dev@xml.apache.org'
> Subject:	RE: Is it possible to make an XSLTProcessor function as a
> Documen tHandler?
> 
> Somehow I missed the fact that XSLTProcessor implements DocumentHandler;
> sorry for the confusion. Not only that, the implementing class has all of
> the methods for the SAX 2 ContentHandler interface. I'm happy now.
> 
> 
> -----Original Message----- 
> From: Scott Boag/CAM/Lotus [ <ma...@lotus.com>] 
> Sent: Tuesday, May 16, 2000 2:05 PM 
> To: xalan-dev@xml.apache.org 
> Subject: Re: Is it possible to make an XSLTProcessor function as a 
> DocumentHan dler? 
> 
> 
> 
> Did you have a look at the PureSAX and the Pipe examples? 
> 
> -scott 
> 
> 
> 
> 
>  
> 
> 
>                     "Sobeck, David"
> 
> 
>                     <david.sobeck@thinkli        To:
> "'xalan-dev@xml.apache.org'" <xa...@xml.apache.org>           
> 
>                     nkinc.com>                   cc:
> Dept-Eng/Dev/Internet <De...@thinklinkinc.com>,   
> 
>                                                  (bcc: Scott
> Boag/CAM/Lotus)                                               
> 
>                     05/16/2000 04:39 PM          Subject:     Is it
> possible to make an XSLTProcessor function as a        
> 
>                     Please respond to            DocumentHan dler?
> 
> 
>                     xalan-dev
> 
> 
>  
> 
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> I have a series of DOM transformations which eventually feed into an 
> XSLTProcessor, which proceeds to publish the results as HTML. I am trying 
> to convert this sequence to SAX in order to avoid the high overhead 
> associated with multiple DOM Documents, but have reached the following 
> stumbling block: the input to the XSLTProcessor must be a String, a
> Stream, 
> or a Node. I think that I want the XSLTProcessor to function as a 
> ContentHandler. I guess that I could serialize my output and have the 
> XSLTProcessor reparse it, but that seems inefficient. I just want some 
> entry point so that I can drive the processor with SAX event methods. 
> 
> 
> It looks like all the right methods are present in XSLTEngineImpl, but it 
> is not declared to implement ContentHandler, and is peppered with dire 
> warnings. 
> 
> 
> I feel like I'm missing something obvious. 
> 
> 
> 
> 
> 
>