Subject: Re: efficient traversal of combined collections in XSLT 3.0
From: Graydon <graydon@xxxxxxxxx>
Date: Tue, 27 Nov 2012 05:03:18 -0500
|
On Sat, Nov 24, 2012 at 02:04:14PM +0000, Andrew Welch scripsit:
> > It doesn't work on the full data set; 16 GB of RAM isn't enough to do this to 4 GB of data. Various wheels are in motion to get more RAM.
>
> Have a look at saxon:discard-document()
>
> http://saxonica.com/documentation9.4-demo/html/extensions/functions/discarddocument.html
>
> "for $x in collection(....) return saxon:discard-document($x)"
I had looked at that, and I was using it wrong so it wouldn't let go.
saxon:discard-document($x)//link[@cite[normalize-space()] is legal
syntax and provides the expected results but apparently confuses the
processor about when it can let go if there's a subsequent reference to
content in $x, even if there's a distinct collection statement for that
second chunk of content.
> Also, I'd separate out the process into two transforms, the first to
> construct some xml containing document uris and the links, then the
> 2nd to check if the target exists.
The intermediate-document approach works much better than the
stuff-this-in-a-variable approach. I find that a bit counter-intuitive,
but am going to remember it for cases on this sale.
Thank you!
-- Graydon
|