Do you actually need this level of stability? It's only relevant if you read the same collection more than once within a transformation or query, which I think is a little unusual. If you do need stability, you can get around the limitation by binding the result of the collection() function to a global variable.
Michael Kay

From: Jeff Kish []
Sent: 27 November 2008 17:09
Subject: [saxon] collections and directories


I was having trouble getting the syntax of collections correct.
I have a directory I want to process, and at first was leaning towards using the collection
form that processes directories, i.e.


However I saw this underneath the discussion in the docs:

"A collection read in this way is not stable. Calling the collection() function again with the same URI will reprocess the directory, and return a different set of document nodes, even if the contents of the directory have not changed."

So I started trying to use a collection file.

Then I looked on the list and saw quite a bit of discussion about the use of the first method -

So does the above method have consistent valid use despite the warning I read in the docs, or is there some way
to use it with consistent accurate results?

I don't mind this form (file:...) of the collection parameter, and actually got it to work, but
I'll debug/figure out whats wrong with my collection file attempt if it isn't really reliable.

thanks for the guidance