Transformation takes a looooooooong time


   I had earlier found my solution to a problem I had initially, to select all my customer elements that belonged within a particular region. Now the transformation worked well for a smaller xml file. But my actual xml is almost 2.5MB and the transformation takes for ever and eventually hangs up. I've been using recurssive loops and I think that takes so long with such a big XML invoice. I'd really appreciate any help provided.

best regards
PV (43.3 KB)


in case your XML document to be transformed consists of many similar fragments each to be handled separately, you may consider usage of SAXON which provides a tag named saxon:preview. It requires some modification of your style sheet, but offers a streaming mode thus avoiding the entire DOM to be constructed in memory. My personal experience is that the execution time scales linearly with the size of the input document.