forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: Form Handler?
Date Sun, 01 Jun 2003 01:47:35 GMT
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







Mime
View raw message