RE: [xsl] Why XTRE1500: Cannot read a document that was written during the same transformation ?

Subject: RE: [xsl] Why XTRE1500: Cannot read a document that was written during the same transformation ?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 29 Jan 2008 09:38:46 -0000
It's designed to stop people treating XSLT as a sequential language, using
documents on filestore to maintain state as a substitute for the fact that
you can't use variables to maintain state. It's very easy for people to
assume that because they are developing on a sequential implementation that
doing things like this is safe, only to find that when they run on a more
highly optimized implementation, or one that takes advantage of parallelism,
that everything stops working. (Your use of the term "later" is the clue.
You're assuming a time axis, and that's always dangerous.)

The design philosophy is that if people want to do things that aren't
portable, they should do this through vendor extensions (which are
permitted) rather than through standard facilities in the language. In Saxon
you can achieve this kind of "cheating" for example by using the
URIResolver/OutputURIResolver to map multiple URIs onto the same underlying
resource. 

>Does the standard assume that developers do not know what they do.

Yes, it's probably a bit paternalistic. But as regulars on this list know
all too well, there are vast numbers of XSLT developers who indeed don't
understand what they are doing (and you should see some other lists). So I
would defend it.

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: ac [mailto:ac@xxxxxxxxxxxxx] 
> Sent: 29 January 2008 02:14
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Why XTRE1500: Cannot read a document that was 
> written during the same transformation ?
> 
> Hi,
> 
> Why XTRE1500: Cannot read a document that was written during 
> the same transformation ?
> 
> This prevents cashing and forces developers to keep large 
> files in memory as they cannot read them again later in the 
> transform, quite a limitation, it seems.  What is the logic 
> behind this ?  Does the standard  assume that developers do 
> not know what they do and that the language has to prevent 
> them from doing things, or is there a better reason ?
> 
> 
> Thanks,
> ac

Current Thread