xsl-list
[Top] [All Lists]

RE: [xsl] XSLT and XML in the same document

2007-05-27 16:29:53
Of course, my 
response regarding the cost of the GET request was based on 
my thought process being distracted long enough to suggest 
something as silly as including the cost of the GET request 
for a document that already exists inside of the 
transformation process.  This, of course, would be correct in 
cases where you use the document function to access an 
external document, but incorrect when you use it for 
introspection of the transformation file.

An XSLT processor might notice at compile time that the stylesheet calls
document('') and might react by keeping a copy of the raw stylesheet entity
around for re-use at run-time. But it's much more likely, I think, that
document('') will be evaluated at run-time and cause a refetch.

(In Saxon, the whitespace nodes, comments and processing instructions in the
stylesheet have been discarded long before the compiler could notice that
there's a call on document('') which requires them to be retained.)

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



--~------------------------------------------------------------------
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>
--~--