cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Using htmlArea 'output' with SVG
Date Wed, 24 Nov 2004 13:11:52 GMT
> Again and again, if you have XML as a string and want to push 
> it over the pipeline, and have it recognized as 'XML' (SAX 
> events), you need to parse it, using an XML parser. Using 
> disable-output-escaping is a trick of which I'm very suprised 
> it even works inside Cocoon, and certainly wouldn't like to 
> see used in the Cocoon samples.

Ok, I came up with this for want of a solution that is less objected to by
the Cocoon community. :-)

> There are various solutions:
> * parse the XML in the flowscript and pass the result as a 
> DOM or a SaxBuffer to the view

This one I don't like. In my project the HTMLarea output is an optional part
of a large object, which would require either complete traversal of the
object or detailed knowledge of the object. Both I don't like to do in
flowscript. And that I wouldn't write down in a Cocoon sample. ;-)

> * embed (x/c)include statements in the template that address 
> the to-be-embedded XML using the module source

This one I don't understand (i.e. I wouldn't know how to implement this). If
I look at the HTMLarea sample, I'd like the "success_display" pipeline to
take care of proper display, so in comes XML containing HTMLarea output
(preferably cleaned by your excellent HTMLcleaner) that should be passed
through the JXTemplate and further processed into the desired result.

> * or use a class like the StringXMLizable attached with this 
> message, and use it like this in the template:
> #{}
> this essentially wraps a string (here addressed as 
> /myobject/mystring) and turns it into an XMLizable object. 
> This of course supposes that the string contains well-formed XML.

This sounds to me the most elegant solution. Could you explain which steps
should be taken (apart from compiling the class and calling it like you
wrote above) to get this working?

So, looking at the htmlarea_success.jx page, would it be right if I rewrote
it something like:

  <p>Raw output:<br/> 
  <p>HTMLized output: <br/>


Bye, Helma

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message