cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@visitronics.be>
Subject sunShine context loading
Date Wed, 27 Mar 2002 21:43:09 GMT
I'm trying to load context data from a pipeline using the load command in 
the sunshine:createcontext tag.  I created a pipeline called getusers.  Its 
output is
<?xml version="1.0" encoding="UTF-8" ?>
- <data xmlns:xsp="http://apache.org/xsp" 
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" 
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<password>bert</password>
<name>bert</name>
</data>

I created another pipeline called form-test.html within a sunRise-auth 
protected part of the pipelines
           <map:match pattern="members/form-test.html">
             <map:generate src="docs/members/form-test.xml"/>
             <map:transform type="sunShine"/>
             <map:transform src="stylesheets/members/doc2form.xsl"/>
             <map:serialize type="html"/>
           </map:match>

The form-test.xml file contains:
<?xml version="1.0" encoding="ISO-8859-1"?>
<page xmlns:sunshine="http://cocoon.apache.org/sunshine/1.0">
   <sunshine:createcontext name="mycontext" load="cocoon://getusers"/>
   <sunshine:loadxml context="mycontext"/>
   <sunshine:form name="myform">
     <sunshine:action>form-test.html</sunshine:action>
     <sunshine:content>
       <sunshine:inputxml name="name" type="text" context="mycontext" 
path="/data/name"/>
       <sunshine:inputxml name="password" type="text" context="mycontext" 
path="/data/password"/>
     </sunshine:content>
   </sunshine:form>
</page>

The sunShine docs state that I need to create the context and then load the 
data into it.  This is what I did.  When I call the page I get the error 
org.apache.cocoon.ProcessingException: The context mycontext does not 
support loading.
The form works fine without the loadxml tag!

Can anybody explain how the sunShine load command works, or what I need to 
adjust to get it running?
I can't find any use of the loadxml tag in the portal.

I'd like to use the load and save command to create a dynamic form 
generation system.  Form description will be in a table. Some aggregation 
and XSLT will let me present all the data using three pipelines; load, 
present and save.

Thanks,
Bert



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message