You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "yunzapito@yunzapito.com" <yu...@yunzapito.com> on 2003/10/07 18:46:32 UTC

Tranformation of a session�s parameter

  I have installed Cocoon 2.2.1 and tomcat 4.1.27 running under jdk1.4.
I´ve got a question about what should i do to transform a XML parameter
that I´ve obtained from an action and that I´m trying to tranform.


  <map:match pattern="acceso">
   <map:act type="session" /> 
   <map:act type="login">
      <map:generate type="session-attr" src="XMLActionResult"/>
   </map:act>
  <map:transform src="sesion/doLogin.xsl">
      <map:parameter name="contextPath" value="{request:contextPath}" /> 
  </map:transform>
  <map:serialize type="html"/> 
  </map:match>

I´m obtaining the next error message:
 org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException

The session-attr generator is the SessionAttributeGenerator. I suppose the
problem is that the generator produces DOM and the transformer needs SAX...


  could I make a transformation from DOM to SAX ?
  Where should I do it (I´m looking to the transformator code, but I don´t
know where and how to make the transformation from DOM to SAX) ?




   Thanks a lot.

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



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


Re: Tranformation of a session´s parameter

Posted by Andrzej Jan Taramina <an...@chaeron.com>.
Y:

>   I have installed Cocoon 2.2.1 and tomcat 4.1.27 running under jdk1.4.
> I´ve got a question about what should i do to transform a XML parameter
> that I´ve obtained from an action and that I´m trying to tranform.
> 
> 
>   <map:match pattern="acceso">
>    <map:act type="session" /> 
>    <map:act type="login">
>       <map:generate type="session-attr" src="XMLActionResult"/>
>    </map:act>
>   <map:transform src="sesion/doLogin.xsl">
>       <map:parameter name="contextPath" value="{request:contextPath}" /> 
>   </map:transform>
>   <map:serialize type="html"/> 
>   </map:match>
> 
> I´m obtaining the next error message:
>  org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> java.lang.RuntimeException

I'll be that is a result of the bug I just posted to the list, regarding how 
SessionAttributeGenerator adds duplicate startDocument/endDocument SAX events 
to the pipeline if the object that is processes is a full DOM Document.  See 
my message about same....

> The session-attr generator is the SessionAttributeGenerator. I suppose the
> problem is that the generator produces DOM and the transformer needs SAX...

Nope....pipeline processing is smart enough to take a DOM and stream it out 
as SAX events.  More likely the problem is the one I encountered.  Check the 
code fix I posted and try rebuilding Cocoon with the fix in place and see if 
that resolves your problem.


Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


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