You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2000/02/22 07:22:42 UTC

RE: [announce] XMLForm - a new project using Xerces, Xalan, & JTi dy

On Mon, 21 Feb 2000, COFFMAN Steven wrote:

> This suggestion is probably out of the scope of what you intended, but
> here's my wishlist. Rather than only treating it as a servlet, I'd like to
> be able to use it *in* a servlet (pass it the request or whatever). Rather
> than writing XML to a file, I'd like to be able to instead just have the
> object returned. It sounds dumb, but as I mentioned before, I jury rigged an
> XML to e-mailed PDF System. My servlet takes an HTML Form submission data
> and outputs it to an XML file. Then I faked an HTTP request to get Cocoon to
> translate the XML into PDF via FOP. Then I spewed the PDF as an e-mail
> attachment to the person who was originally targetted by one of the form
> values. It's a terrible hack, but XMLForm + James + Cocoon + FOP would make
> a very nice implementation, once FOP's PDF to support Vector graphics (which
> I've been doing, and I'm almost ready to submit).

You can already do that. Just call the createDocument method. it takes two
arguments, a request from which it reads values and a dictionary to which
it writes magic values (things that begin with "xmlform:"), and returns a
Document object. It's a public method for a reason. :)

- donald