OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] XSLT with DOM or SAX ?

[ Lists Home | Date Index | Thread Index ]

> Concerning your discussion about performance of 
> transformation, I have a related question:
> 
> Suppose we have a big XML document (>10MB) that rarely 
> changes. Now we want to transform it very often (>100 per 
> minute) in different ways, to extract and transform different 
> parts of the XML to distinct targets. 
> What is the best practise?
> Is there a way to make the transformer to cache the internal 
> optimized representation of the XML?

The answer to this is processor-dependent.

In Saxon there are various ways of building the internal representation of
the tree in memory, depending how much control you want to exercise: the
simplest is 

DocumentInfo doc = StaticQueryContext.build(streamSource);

Since DocumentInfo implements the JAXP Source interface, you can then use it
directly as the input to a transformation, as often as you like.

Michael Kay
http://www.saxonica.com/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS