Lists Home |
Date 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
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.