cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: [RT] do me a favor, don't call them taglibs (TAL-like two-step templating?)
Date Sat, 04 Dec 2004 22:55:39 GMT
Roy G. Biv wrote:
> Daniel Fagerstrom wrote:
<snip/>
>> You're right no need to optimize until we know if it is needed. AFAICS 
>> the only reasonable way of accessing the XML input is things like 
>> XPath that in general need access to the complete XML-tree. And in 
>> that case we can reuse XSLT processor technology if needed. Going for 
>> something like STX-style access would be far to complecated for the 
>> intended audience.
> 
> 
> Why is STX considered more complex than XSLT?

I mean for writing a simple to use template language that works like 
XSLT: XML->XML driven by a stylesheet. If the template writer want to 
render data in another order than that of the input document, the 
streaming, non-buffering nature of STX will bite them. They need to 
write rules that are trigered by the correct input events and buffer the 
data. This requires some thinking even for experienced programmers.

In XSLT you have random access to the whole tree and don't need to care 
about temporal order of things. Much easier.

> Sure it doesn't have 
> arbitrary source tree access, but the syntax is very similar to XSLT by 
> design.  Instead of <xsl:template>, you have <stx:template>.

I have written a number of STX style sheets for a number of different 
application, where avoiding buffering was important for performance. I 
would say that syntax is its only similarity with XSLT. Or do you have 
different experience.

> I still 
> think that STX would act as an effective macro expansion mechanism 
> instead of having macros in Java/SAX.

As said in another letter: macro expansion is written in the template 
language it self.

/Daniel

Mime
View raw message