Re: [xsl] sax or dom in XSLT procesing ?

Subject: Re: [xsl] sax or dom in XSLT procesing ?
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Tue, 28 Jan 2003 17:12:44 +0100

Hello xsl-list,

when I see how to use xalan for xslt I founded that as source
it can use both DOM and SAX. I make data for procesing with xslt in my
programm and withot saveng xml data to disk transform it with xstl.
What is better to use as input data? dom or sax? I think that xslt
processor in any case convert inpur data to DOM and only after that
transform.
whats you opinion ? if i`m right ?

--
Best regards,
 Andrey                          mailto:solo@xxxxxxxxxxxxxx


A XSLT processor may not use DOM internally but rather an own tree model which is better suited to implement optimizations.
(like Saxon and jd.xslt do). If you pass a DOM tree, then the processor could choose to rebuild the tree in its internal model.


So if you have the choice to pass the input as DOM tree or as SAX events, then choose SAX, therefore making less assumptions about the processors inner workings.
But if you already have constructed the DOM, then pass the DOM.


regards,
Johannes



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


Current Thread