This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SAX mode, DOM mode and caching


Hi Tangy,

Tangi Vass wrote:
> 
> I've been thinking of a cachable queue of SAX events. I would like to have
> the opinion of you, folks, about this idea before trying to implement it.
> 

We'd discussed it before and I have just implemented a simple one very
recently (I plan to publish this as soon as I have found enough time to
document it).

I have a simple class for each of the SAX events (a StartElement class,
a Characters class, a EndElement class, ...).

Objects from these classes have constructors with the same parameters
than SAX events and can emit the corresponding event. Lists of such SAX
objects can be manipulated and cached.

I am currently using these classes for 2 purposes on XMLfr (and 4xt).

The first one is to paginate a XSLT RTF to split XML documents into WML
pages (I am developping a WAP access to XMLfr). The split is done using
a splitable derived class of the SAX objects list.

The second one is to cache my input document (I have developped a SAX
filter doing so transparently) and you're right, I get a huge (50%)
performance boost when transforming cached documents even though I
haven't really tried to optimize the whole thing.

Eric
-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]