Subject: Re: possible to mimic while-like behavior? From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 17 Mar 2000 11:44:32 GMT |
David Carlisle > It is best to think of xsl:for-each evaluating the template on all the > Some xslt engines may in fact evaluate them one at a time, in document > order, but they are not obliged to do that. Mike Brown > Really? Can you give some examples where processing order is ambiguous and > may vary from processor to processor? Every example of xsl:for-each. There is no requirement on the processor to evaluate the templates on each node in any particular order, only that the resulting nodes are appended to the result tree in document order. One of the main reasons for using a side effect free language is to allow templates to be evaluated in any order, your stylesheet may have xsl:for-each select="chapter" and if you jump straight to chapter 100 then a system could start rendering chapter 100 and go back and fill in the rest later, you don't have to wait until it processes the first 99 chapters before it can display the page you asked for. (Not that any system currently works this way). My reason for saying that it helps to think of parallel computation here was not because any system is implemented that way, but it helps to answer the faq questions of trying to terminate a loop based on results of evaluating the template on some of the nodes. If you don't assume the nodes are processed in document order, it is clear why this can not work. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: possible to mimic while-like be, Mike Brown | Thread | Re: possible to mimic while-like be, Nikolai Grigoriev |
Re: Microsoft XSL and Conformance, Niclas Hedhman | Date | RE: Tutorials on XSL, Kester, Peter |
Month |