Thanks a lot Andrew, I was reusing the transformer instance.

-- Anand Nalya

On 21/02/2008, Andrew Welch <> wrote:
On 21/02/2008, anand <> wrote:
> I'm using XSLT templates with saxon for conversion from xml to xhtml. Apart
> from the main xml document, the stylesheet access some data though xpath
> function 'document()'. The data returned by these uri is generated
> dynamically.
> The problem is that for the first transformation the data is right, but the
> transformation performed afterwards also uses the data returned earlier. Can
> I force saxon to pull data every time a transformation takes place using the
> compiled stylesheet?

The document() function is designed to return the same document for
the same URI during the same transform - so if you've based your
process on it behaving differently then your overall process might
need reviewing.

If, however, you are just doing two seperate transforms but reusing
the same Transformer then you just need to recreate the Transformer
for each transform (I think that will be enough, anyway).

Andrew Welch

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
saxon-help mailing list archived at