xsl-list
[Top] [All Lists]

RE: [xsl] Reading and writing into the same file

2010-03-09 10:36:57

In XSLT 1.1 it was possible to read a file in to the XSLT 
then rewrite to that same file using the xsl:document 
function. In XSLT 2 the same is only possible if you use an 
extension function such as saxon:discard-document together 
with xsl:result-document. Is this correct and why has this happened?

XSLT 1.1 was only a working draft and never went through the kind of
thorough review needed to get a spec to Recommendation status. The
consequences of allowing the same document to be read and written in the
same transformation were therefore not discovered until later.
(Specifically, order of execution is not defined, so the stylesheet author
has no way of controlling whether the read happens before the write, or
after it.)

Regards,

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--