This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: RE:read-write same url in xslt 2 [was appendig to multiple output files]


> >This reminds me that we haven't said anything in XSLT 2.0 about what
> happens
> >if you try to read and write the same URL within a single
> transformation.
> We
> >will have to say it's an error, but whether we say the
> processor has to
> >detect it and report it is another question.
>
> why does it have to be an error? it works with Saxon if you're using
> version="1.1"

It has to be an error because the results depend on the sequence of
execution, which isn't defined by the language spec. It only works in Saxon
because Saxon (today) processes instructions in left-to-right order. Writing
a document using xsl:result-document and then reading it using document() is
a way of getting side-effects that depend on the sequence of execution.

(Incidentally, I have often considered pre-evaluating the document()
function at compile time if the arguments are known; if I did that, your
Saxon stylesheet would stop working.)

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]