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 - [EMAIL PROTECTED] 
ASSET Soft a.s.,
Kosicka 56, Bratislava, 821 08
Slovakia, Europe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to