[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] document function cached?


Subject: Re: [xsl] document function cached?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 08 Feb 2013 21:01:02 +0000

The requirement in the spec is that if you call document() twice with the same URI during the same transformation, you get the same document back (where "same" is defined in terms of node-identity: count(a|b) = 1.)

In practice, implementations achieve this by caching the document.

Saxon has an extension, saxon:discard-document(), whose effect is to disable this caching.

Michael Kay
Saxonica


On 07/02/2013 16:34, Michel Hendriksen wrote:
Hi list,

I have a case where I call an external service to provide me with some
unique number. Every time I call the service I want a different
number.

The call looks like this:

<nbn><xsl:value-of select="document($nbn-service)/nbn-set/nbn[1]"/></nbn>

But everytime I  use this I get the same number and my server doesn't
show multiple calls. I can see multiple calls taking place in the
stylesheet.

So I wonder, is this call cached? And if so, how can I disable caching
on this call?

Thnx

Michel Hendriksen


Current Thread