Vadim Gritsenko <[EMAIL PROTECTED]> 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
[1]
> (line 134), and I'd suggest leaving it there as logicsheets might
bedependent
> 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:
<key:key>
<xsp-request:get-parameter name="key"/>
</key: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() != 'http://apache.org/xsp' 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]
> http://cvs.apache.org/viewcvs.
>
cgi/cocoon-1/src/org/apache/cocoon/components/language/markup/xsp/XSPMarkupLanguage.
> java?rev=1.1.2.1&only_with_tag=xml-cocoon2&view=markup
Regards,
Jochen
[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111693513631888&w=2