[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Max size?
> Michael Kay wrote: > > That's precisely what I meant by "a small class of very simple > > stylesheets". I came to the conclusion that there are so few real > > stylesheets like this that it's not worth the trouble. > > I thought this situation was quite common, but at a second > thought you are probably right. I still think, however, that > many of the current style sheet would allow discarding quite > a few of the input early, or could be rewritten to allow > this. How could this problem be attacked? Would schema > information help? I think effective processing of large > documents is a concern. > One approach is to use a completely different language for serial transformations. There is a group developing something called STX to achieve this. To do serial transformations, I believe you need a different processing model. Because you can't revisit a node once it's passed by, I believe that you need to maintain state (some kind of working storage), and you therefore need a procedural language rather than a declarative one. Alternatively you could provide update (rather than merely append) access to the result tree, so that it's the result tree rather than the source tree that has to be kept in memory. Another possible approach (built on the concept of Saxon's preview mode) is to map the large source document to a set of small source documents, one per "record" (typically a level-2 element). If these small documents are supplied as the value of the input() collection (an XSLT 2.0 facility), and if the entry template in the stylesheet takes the form <xsl:apply-templates select="input()"/> and if there are no other references to input(), then you know that the "documents" in the input collection can be processed one at a time, and that each one can be discarded as soon as it has been processed. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx 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
|