cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kuhnle <>
Subject Re: Why does XSPMarkupLanguage wrap text in xsp:text?
Date Tue, 07 Jun 2005 11:58:29 GMT
Vadim Gritsenko <> wrote on 06.06.2005 16:19:44:

> Jochen Kuhnle wrote:
> > I noticed that XSPMarkupLanguage.characters wraps text in 
> > xsp:text elements. Is there a reason for this? At least my XSPs work 
> > without this...
> This logic has been there since beginnings of Cocoon2 XSP implementation 
> (line 134), and I'd suggest leaving it there as logicsheets might 
> on this.

I just found one other thing: I'm implementing the cache control logic 
sheets for XSPs [1], and there, the <xsp:text> wrapping actually makes 
things more complicated. What we wanted was something like this:

        <xsp-request:get-parameter name="key"/>

where the key template would append all child elements to the cache key. A 
simple <xsl:for-each select="*"/> in the logic sheer would suffice. If not 
for the <xsp:text> wrapping... Because this actually wraps the white space 
between <key:key> and <xsp-request:get-parameter> in <xsp:text>, making

things in the logic sheet more complicated. Not very straight forward:

<xsl:for-each select="*[namespace-uri() != '' or 
local-name() != 'text'">

> I guess original idea was that text() nodes can be safely ignored, while 

> xsp:text nodes are meaningful. It might be still true, haven't 
> digged deeper...
> Vadim
> [1] 
> java?rev=



View raw message