cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ġURDINA Michal <durd...@asset.sk>
Subject [BUG?] XSPGenerator breaks standard logicsheets
Date Tue, 26 Nov 2002 16:15:49 GMT
Hello!

Following problem emerged after migration from Cocoon 1.8 to Cocoon 2.0.3.

Cocoon2 (XSPMarkupLanguage.PreProcessFilter) performs wrapping of PCDATA
nodes in source document with <xsp:text> elements before performing xsl
transformations with logicsheets. This fact is not taken into account in
built-in logicsheets in template "get-nested-content". They do not treat
generated <xsp:text> elements correctly.

Consider following xsp page. Essential part here is the binding of parameter
"name" for <request:get-parameter>, where the value is provided by another
taglib statement (simple xsp:expr in this case, but rather a call to a tag
from user defined logicsheet).

<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java" 
  xmlns:xsp="http://apache.org/xsp" 
  xmlns:request="http://apache.org/xsp/request/2.0" >

  <result>
    <xsp:logic>String paramName = "param1";</xsp:logic>
    
    <request:get-parameter>
      <request:name>
        <xsp:expr>paramName</xsp:expr>
      </request:name>
    </request:get-parameter>

  </result>
</xsp:page>

Although this looks like working, this page causes Java compilation errors
because of whitespaces and newline characters within <request:name> element.
I think there is a bug in get-nested-content in request.xsl, particularly in
<xsl:when test="$content/xsp:text">, because this condition does not count
with <xsp:text> elements added by ServerPagesGenerator before processing by
logicsheets.

Q1: Why text node wrapping behavior was introduced in Cocoon2 (Cocoon 1.x
worked without that)?
Q2: If this is a bug, do you need my help to fix that?

Mike

-- MisoD --
Michal Durdina - durdina@asset.sk 
ASSET Soft a.s.,
Kosicka 56, Bratislava, 821 08
Slovakia, Europe

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message