Ugo
Well, all this may be clear to you... but not to me :{
Where I am trying to get to is not to deal with single
"bits" of htmlArea text, but with an entire file created
using a Cform. Are you proposing that each field containing
htmlArea text must be "intercepted" and processed before
the form data is stored? Or is when you read it back?
I am not sure why you have created the "dom" variable
in your script below, or what you would do with it.
There are likely to be a number of users, all creating and
drawing data from different files via CForms; is this
likely to be a problem?
Derek
>>> [EMAIL PROTECTED] 2004/11/23 03:10:59 PM >>>
Il giorno 23/nov/04, alle 13:11, Derek Hohls ha scritto:
> OK - so what needs to be done to integrate this into a
> Cocoon application? I assume this is a page generator
> of some sort (or is a new transformer?), but I have not
> customized Cocoon in this way before. Pointers to next
> steps would be welcome...!
This is just a plain, old Java object with a single public static
method. I don't know why you always manage to make things harder than
they are ;-)
You can call it from flowscript like this:
var dom = HTMLParser.parse(form.lookupWidget("/field").value;
Of course, being a simple Java class, you can call it from Java code as
well.
The only problem it has, AFAIK, is that it defines a single static
instance of an XML parser, which is not threadsafe, so the only method
that uses it is synchronized. This is not going to scale, of course,
but it is not a problem unless you need to concurrently process a lot
of HTML strings. And it has an explicit dependency on Xerces instead of
using JAXP. As far as I can remember, I had some problems with JAXP and
Neko, so I made it like that, but I can't remember the details at the
moment.
Ugo
--
Ugo Cei - http://beblogging.com/
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]