[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Design question
On Wednesday 10 July 2002 01:50, Antonio Fiol wrote: > I thought there was no concept of "before" and "after" on XSLT. That's not true. XSLT is designed so that it is possible for things to be processed out of order, but when everything is finished, the output is still pieced together in the correct order. It is certainly OK to say that one node will be output before or after another. The problem is that when the processor is serializing the output of the stylesheet (ie., writing the output to a file or network connection), it has to write each element as it is created. This means that as soon as it processes an <element> in the stylesheet, it writes out "<element" to the file. It doesn't write the ">", because it is waiting for any <xsl:attribute>s that might be processed in the future. But it can only wait until the next element or text node is processed, at which point it has to write out the ">" and begin writing the next node. This means that any <xsl:attribute>s have to be processed before any text or an element are output as children of the current element. If an <xsl:attribute> comes at a later point, then the ">" has already been written and it is too late to write the attribute. > I know, but I thought this would work. Nope, sorry :) The later attributes will be ignored (if it doesn't give an error). -- Peter Davis 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
|