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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Incremental transformations with Xalan and performance issues?

[ Lists Home | Date Index | Thread Index ]

I'm in a situation where I need to parse some large documents, where the 
first few elements are a preamble with various parameters and the end of the 
document is a large list of entries.

Think of a mail merge, where the letter to be sent is defined first in the 
mail merge xml, followed by numerous recipient entries, something like this:

<mailmerge>
	<letter>
		...letter def goes here
	<letter>
	<recipients>
		<recipient>
			...recipient data
		</recipient>
		<recipient>
			...recipient data
		</recipient>
		etc...
	</recipients>
<mailmerge>

What I was wondering was how Xalan handles the processing of such large 
documents (say a million recipient entries) when the parser is using SAX?

More specifically, if I create global variables such as:

	<xsl:variable name="letterTemplate" select="/mailmerge/letter"/>

then later:

	<xsl:template match="recipients/recipient>
		<!-- process the recipient using $letterTemplate -->
	</xsl:template>

Will the processing be incremental in nature, as SAX events are received by 
Xalan?  That is, is Xalan smart enough to create the global as soon as it 
can, followed by processing of each individual recipient as each related SAX 
event is received?  In that case, having the shared global info early in the 
document and the large list at the end would probably have beneficial 
performance implications.

Or will the whole document have to be instantiated as some sort of internal 
tree first?

Hopefully, it's incremental in nature, since otherwise we might blow out 
memory with such large documents.

Any insight into the implications of processing such large documents, using 
globals, xslt stylesheet structure, impact of element ordering in the 
document and the like would be very much appreciated.

Thanks!




Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.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