Hi all,

I might be asking a very basic question but I really have tried the things out before posting this question.

I want to create a cocoon session which basically loads the XML data from MySQL  so I have done the following:

 

I have created myfirstsession1.xml which contains

 

<resource xmlns:session="http://apache.org/cocoon/session/1.0"> <session:createcontext name="dbtrackdemo" load="cocoon://load-from-db" save="cocoon://save-to-db"/>

  <!-- build context data -->

  <context>

  <loadxml context="dbtrackdemo"/>

  </context>

  </resource>

 

Then I have defined the load-from-db (which works fine alone) and mydbsession resources in the sitemap

 

<map:pipeline>

<map:match pattern="load-from-db">

<map:generate src=""/>

 <map:transform type="sql"> 

 <map:parameter name="use-connection" value="newdb"/>

   </map:transform>

     <map:serialize type="xml"/>

    </map:match>

</map:pipeline>

 

<map:pipeline>

<map:match pattern="mydbsession">

<map:generate src=""/>

<map:transform type="session"/>

<map:serialize type="xml"/>

</map:match>

</map:pipeline>

 

So when I request the mydbsession resource I get (nothing):

 

<?xml version="1.0" encoding="ISO-8859-1" ?>

<resource xmlns:session="http://apache.org/cocoon/session/1.0">

<!--  build context data -->

<context>

<loadxml context="dbtrackdemo" />

 </context>

 </resource>

 

I am sure that I am missing or putting thing in wrong place or order.

Any help or hints would be appreciated.

Fadi


Do you Yahoo!?
Better first dates. More second dates. Yahoo! Personals

Reply via email to