[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: speed optimization
David Carlisle speculated: It seems to me that the only way an XSLT processor can ensure that document('foo') always returns the same node set is to hand on to it (either the node set, or the document) after the first access. There are two questions here: (a) ensuring that the contents are still the same if the document is re-read, and (b) ensuring that the same node ids are generated if the contents are unchanged. You can do (a) by locking the resource if it happens to be held in a database or a WebDAV server, or you could do it optimistically by checking the "last-update" timestamp and crashing out if the document has changed. You can do (b) simply by remembering the URL-to-document-number mapping, even if you have discarded the contents and need to refetch and reparse the XML. Saxon DOES keep the document in memory for the duration of the transformation, to some people's occasional annoyance; there are circumstances in which I think this is avoidable. Michael Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|