[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT and XML in the same document

Subject: RE: XSLT and XML in the same document
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 28 May 2007 00:29:21 +0100
RE:  XSLT and XML in the same document
> 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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.