You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Jason Kary <jk...@cisco.com> on 2003/05/30 19:53:08 UTC

Form Handler?

Hi,

I am fairly new to Forrest and Cocoon.  I was reading through some of 
the recent messages in the list and I thought the head version of 
forrest was recently upgraded to use Cocoon 2.1?  Is this a correct 
assumption?  

I've been trying to get forrest to use forms as defined by the Cocoon 
2.1 documentation.  Does anyone know if this is possible with forrest?  

Take Care
Jason Kary



Re: Form Handler?

Posted by Jeff Turner <je...@apache.org>.
On Sat, May 31, 2003 at 10:13:34AM -0400, Jason Kary wrote:
> Jeff & David,
> 
> Thank you for your responses.  
> 
> I will be happy to help if I can.  I've gone through the 
> 'tutorial-develop-webapp.xml' document found with Cocoon verion 2.1. 
> Currently I am stuck trying to validate my 'form' tags in my 
> userForm.xml file.  It appears the 'document' dtd does not understand 
> the tag and doesn't support xmlns attributes.

Yes, it doesn't.  You can switch off validation by editing
forrest.properties, and setting:

forrest.validate.xdocs=false

Then once you're happy with what Cocoon is doing with the tags, you can
add DTD declarations for the extra form elements, and switch validation
back on.

--Jeff


Re: Form Handler?

Posted by David Crossley <cr...@indexgeo.com.au>.
Jason Kary wrote:
> 
> Thank you for your responses.  
> 
> I will be happy to help if I can.  I've gone through the 
> 'tutorial-develop-webapp.xml' document found with Cocoon verion 2.1.

Ooh - be careful. That old tutorial is about a basic database
solution that came with 2.0. It is still relevant, but there are
other facilities today. You may do better to look at the various
"forms" solutions - search the documentation and the Wiki for
the terms "woody", "jxforms", or "xmlform" and see the Cocoon 2.1
samples for those.

>  Currently I am stuck trying to validate my 'form' tags in my 
> userForm.xml file.  It appears the 'document' dtd does not understand 
> the tag and doesn't support xmlns attributes.

That is correct - that DTD is for documents and not forms-based webapps.

> I am trying to start out small by copying the example from the 
> Cocoon-2.1->Tutorial->WebApp.  The basic structure of the document is:
> 
> <document>
> <body>
>     <form handler="Create Department.html" >
>         <text name="name" size="30" required="true" />
>          <submit name="Create Department" />
>     </form>
> </body>
> </document>
> 
> The problem with this document is 'forrest validate'  does not recognize 
> the form tag?

That is how it is supposed to be. The elements <form> and friends
are not valid in a "document".

> I searched through the list of dtd's in both the head of 
> cocoon-2.1 and xml-forrest.  I can't seem to find a valid dtd
> document?

I think that you have missed the real point of what jeff was saying.
 
> Jeff Turner wrote:
> >
> >It is possible, but there is no forms support provided by default.  You'd
> >have to override the sitemap.xmap and cocoon.xconf files and add whatever
> >you need.

Follow the "Using Forrest" [1] document to add your own document type
and stylesheets. To get Forrest to process your own document type,
your project will need to have its own sitemap and you will need
to configure your own "entity catalog" to define the location of
your DTDs. (I wonder if another option is to not have any document
type declaration in your xml instance documents.)

If you are going to use one of the "forms" frameworks, rather than
roll-your-own, then you should experiment with that in Cocoon proper
before trying to implement it via Forrest.

You should also consider why you are choosing to using Forrest
over using Cocoon directly. What advantage does Forrest provide
for your situation?

--David

[1] http://xml.apache.org/forrest/your-project.html







Re: Form Handler?

Posted by Jason Kary <jk...@cisco.com>.
Jeff & David,

Thank you for your responses.  

I will be happy to help if I can.  I've gone through the 
'tutorial-develop-webapp.xml' document found with Cocoon verion 2.1. 
 Currently I am stuck trying to validate my 'form' tags in my 
userForm.xml file.  It appears the 'document' dtd does not understand 
the tag and doesn't support xmlns attributes.

I am trying to start out small by copying the example from the 
Cocoon-2.1->Tutorial->WebApp.  The basic structure of the document is:

<document>
<body>
    <form handler="Create Department.html" >
        <text name="name" size="30" required="true" />
         <submit name="Create Department" />
    </form>
</body>
</document>

The problem with this document is 'forrest validate'  does not recognize 
the form tag?  I searched through the list of dtd's in both the head of 
cocoon-2.1 and xml-forrest.  I can't seem to find a valid dtd document?

Anyone have any thoughts about what area of the code I should 
investigate next?

Thanks again!
Jason Kary


Jeff Turner wrote:

>On Fri, May 30, 2003 at 12:53:08PM -0500, Jason Kary wrote:
>  
>
>>Hi,
>>
>>I am fairly new to Forrest and Cocoon.  I was reading through some of 
>>the recent messages in the list and I thought the head version of 
>>forrest was recently upgraded to use Cocoon 2.1?  Is this a correct 
>>assumption?  
>>    
>>
>
>Yes, specifically, Cocoon 2.1 Milestone 2, the latest release.
>
>  
>
>>I've been trying to get forrest to use forms as defined by the Cocoon 
>>2.1 documentation.  Does anyone know if this is possible with forrest?  
>>    
>>
>
>It is possible, but there is no forms support provided by default.  You'd
>have to override the sitemap.xmap and cocoon.xconf files and add whatever
>you need.
>
>--Jeff
>
>  
>
>>Take Care
>>Jason Kary
>>
>>
>>    
>>




Re: Form Handler?

Posted by Jeff Turner <je...@apache.org>.
On Fri, May 30, 2003 at 12:53:08PM -0500, Jason Kary wrote:
> Hi,
> 
> I am fairly new to Forrest and Cocoon.  I was reading through some of 
> the recent messages in the list and I thought the head version of 
> forrest was recently upgraded to use Cocoon 2.1?  Is this a correct 
> assumption?  

Yes, specifically, Cocoon 2.1 Milestone 2, the latest release.

> I've been trying to get forrest to use forms as defined by the Cocoon 
> 2.1 documentation.  Does anyone know if this is possible with forrest?  

It is possible, but there is no forms support provided by default.  You'd
have to override the sitemap.xmap and cocoon.xconf files and add whatever
you need.

--Jeff

> Take Care
> Jason Kary
> 
> 

Re: Form Handler?

Posted by David Crossley <cr...@indexgeo.com.au>.
Jason Kary wrote:
>
> I am fairly new to Forrest and Cocoon.  I was reading through some of 
> the recent messages in the list and I thought the head version of 
> forrest was recently upgraded to use Cocoon 2.1?  Is this a correct 
> assumption?  

That is correct ... cocoon-2.1M2 pre-release milestone.

The Forrest cvs was also marked with the tag "stable" after
a few of us tested it on our own sites and on the current
Cocoon xdocs. So use that, or join the bleeding edge.

> I've been trying to get forrest to use forms as defined by the Cocoon 
> 2.1 documentation.  Does anyone know if this is possible with forrest?  

I do not know about this ... great if it can.
I presume that you are aware that there are various "forms"
implementations in Cocoon-2.1

--David