cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <...@apache.org>
Subject Re: Using htmlArea 'output' with SVG
Date Tue, 23 Nov 2004 13:10:59 GMT
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/

Mime
View raw message