You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Kurt Riede <ku...@web.de> on 2005/04/03 14:26:45 UTC

is pre-generation and caching a DTM possible?

Suppose we have a big XML document (>10MB) that rarely changes.
We also have a single stylesheet to transform the XML very often (>500/min)
in different ways, to extract and transform different parts of the XML to
distinct targets.

For every transformation, Xalan again builds the DTM from the XML what
impacts performance dramaticaly because the transformations themselfs are
quite simple.

Is there a way to make the transformer to cache the internal optimized
representation of the XML?

Or can I pre-generate the DTM by myself and put it into a DOMSource somehow?

Regards

Kurt Riede


Re: is pre-generation and caching a DTM possible?

Posted by db...@qis.net.
Heh: nice spilleng on the xsltc web page

"XSLTC is 100% compliant with the TrAX poriton of the JAXP API. "

:)

Quoting Joanne Tong <jo...@ca.ibm.com>:

> Hi
> 
> If you're using XSLTC, you could cache the XML document. 
> 
> http://xml.apache.org/xalan-j/xsltc/xsltc_trax_api.html
> 
> Joanne Tong
> Software Developer, XSLT Development, IBM Toronto Lab
> 
> 
> 
> 
> "Kurt Riede" <ku...@web.de> 
> Sent by: kurt.riede@web.de
> 04/03/05 08:26 AM
> 
> To
> <xa...@xml.apache.org>
> cc
> 
> Subject
> is pre-generation and caching a DTM possible?
> 
> 
> 
> 
> 
> 
> Suppose we have a big XML document (>10MB) that rarely changes.
> We also have a single stylesheet to transform the XML very often 
> (>500/min)
> in different ways, to extract and transform different parts of the XML to
> distinct targets.
> 
> For every transformation, Xalan again builds the DTM from the XML what
> impacts performance dramaticaly because the transformations themselfs are
> quite simple.
> 
> Is there a way to make the transformer to cache the internal optimized
> representation of the XML?
> 
> Or can I pre-generate the DTM by myself and put it into a DOMSource 
> somehow?
> 
> Regards
> 
> Kurt Riede
> 
> 
> 




Re: is pre-generation and caching a DTM possible?

Posted by Dave Brosius <db...@qis.net>.
I suppose you could load the style sheet into a DOM document, and always do 
the transform using a DOMSource as the stylesheet source. Would probably 
speed up things some.

----- Original Message ----- 
From: "Kurt Riede" <ku...@web.de>
To: <xa...@xml.apache.org>
Sent: Monday, April 04, 2005 3:09 PM
Subject: Re: is pre-generation and caching a DTM possible?


> So does this mean that there's no such possibility for XalanJ?
> Saxon has such possibility and, as you say, XSLTC as well.
> Do I have to change my transformer?
>
> To precise my requirements:
> I have a single fixed stylesheet and a single fixed huge XML document.
> Clients request different parts from the XML what is defined by parameters
> to the stylesheet.
> Parsing the XML takes much more time than the transformation itself.
>
> Thanx and regards
> Kurt



Re: is pre-generation and caching a DTM possible?

Posted by Kurt Riede <ku...@web.de>.
So does this mean that there's no such possibility for XalanJ?
Saxon has such possibility and, as you say, XSLTC as well.
Do I have to change my transformer?

To precise my requirements:
I have a single fixed stylesheet and a single fixed huge XML document.
Clients request different parts from the XML what is defined by parameters
to the stylesheet.
Parsing the XML takes much more time than the transformation itself.

Thanx and regards
Kurt

----- Original Message ----- 
From: Joanne Tong
To: Kurt Riede
Cc: xalan-j-users@xml.apache.org
Sent: Monday, April 04, 2005 4:46 PM
Subject: Re: is pre-generation and caching a DTM possible?

Hi

If you're using XSLTC, you could cache the XML document.

http://xml.apache.org/xalan-j/xsltc/xsltc_trax_api.html

Joanne Tong
Software Developer, XSLT Development, IBM Toronto Lab



"Kurt Riede" <ku...@web.de>
Sent by: kurt.riede@web.de
04/03/05 08:26 AM To<xa...@xml.apache.org>
cc
Subjectis pre-generation and caching a DTM possible?







Suppose we have a big XML document (>10MB) that rarely changes.
We also have a single stylesheet to transform the XML very often (>500/min)
in different ways, to extract and transform different parts of the XML to
distinct targets.

For every transformation, Xalan again builds the DTM from the XML what
impacts performance dramaticaly because the transformations themselfs are
quite simple.

Is there a way to make the transformer to cache the internal optimized
representation of the XML?

Or can I pre-generate the DTM by myself and put it into a DOMSource somehow?

Regards

Kurt Riede


Re: is pre-generation and caching a DTM possible?

Posted by Joanne Tong <jo...@ca.ibm.com>.
Hi

If you're using XSLTC, you could cache the XML document. 

http://xml.apache.org/xalan-j/xsltc/xsltc_trax_api.html

Joanne Tong
Software Developer, XSLT Development, IBM Toronto Lab




"Kurt Riede" <ku...@web.de> 
Sent by: kurt.riede@web.de
04/03/05 08:26 AM

To
<xa...@xml.apache.org>
cc

Subject
is pre-generation and caching a DTM possible?






Suppose we have a big XML document (>10MB) that rarely changes.
We also have a single stylesheet to transform the XML very often 
(>500/min)
in different ways, to extract and transform different parts of the XML to
distinct targets.

For every transformation, Xalan again builds the DTM from the XML what
impacts performance dramaticaly because the transformations themselfs are
quite simple.

Is there a way to make the transformer to cache the internal optimized
representation of the XML?

Or can I pre-generate the DTM by myself and put it into a DOMSource 
somehow?

Regards

Kurt Riede