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

Re: Design question

Subject: Re: Design question
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Wed, 10 Jul 2002 02:05:33 -0700
peter davis designer
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


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.