At the moment there is no way to pass SAX events into the chain, no. The 
problem is that the entire model of the pipeline is sequential, each stage is 
completed before the next is started, so there really is not a good way to 
pass SAX events. In theory you could cache them, but then you can basically 
consider a DOM tree to be a set of cached SAX eventa already, so how are you 
going to make it better than that?

You can however use the SaxMachines stuff to build complex SAX filter chains. 
As far as AxKit is concerned its all one 'processing step', but you can still 
have any amount of plumbing you want in there. For instance I built some SAX 
pipelines that merged several input files together to produce output, and 
they had quite a few steps. I think the Image Gallery application uses SAX a 
good bit too.

And of course you can use SAX in a provider. I built several specialist 
providers that way for various projects. Its a real good way to convert perl 
data into specific XML structures, you convert it to a series of SAX events 
and then you can spit out a DOM tree at the end.

On Saturday 05 April 2003 01:12 pm, John Fessenden wrote:
> On Thu, 3 Apr 2003, Tod Harter wrote:
> > SAX is quite well supported by AxKit actually. check out
> > XML::SAX::Machines and the AxAddSaxMachine directive. I suspect you can
> > do what you want  via a SAX-only pipeline, but it might take a bit of
> > brain-surgery to make sure things come out exactly right. Maybe the way
> > to do it would be to have a provider that shoves chunks of XML into a SAX
> > pipeline as data becomes available and use SAX just to tweak it to
> > whatever format you want. Its not quite as nice as having XSLT, but you
> > can do a fair amount with SAX and with some real cleverness you can even
> > generate small bits of DOM tree, apply an XSLT to it with perl code, and
> > spit that out as one 'block' of your output.
>
> how exactly would one go about writing a provider that output SAX events
> into the chain?  I've written a content provider that uses a SAX driver I
> wrote to parse some proprietary text markup, and output XML.  but within
> the provider I chain my driver to XML::SAX::Writer to provide a scalar for
> get_strref().
>
> is there a better way? ( more streaming)
> is there something I missed in the API that would allow the content
> provider to provide SAX events into the chain, without having the
> intermediate step of converting to text to pass through the scalar?
>
>
> --fess
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to