cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Converting &lt;tag&gt; to <tag>, how?
Date Tue, 16 Nov 2004 20:18:17 GMT
Joerg Heinicke wrote:

> On 15.11.2004 23:52, H.vanderLinden@MI.unimaas.nl wrote:
>
>>> http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/blocks/form
>>
>>
>> s/samples/flow/binding_example.js?rev=30943&view=auto, function 
>> loadDocument(uri):
>>
>> I've looked at this example before, but I cannot figure out how to 
>> use this
>> in my situation:
>>
>> Input in HTMLarea is saved in an object and stored as string, no 
>> conversion
>> of &lt; etc needed. On retrieval it ends up somewhere in a complicated
>> hierarchy in a bean that is passed onto a JXTemplate for display.
>> Is there something I could do in the JXTemplate?
>
>
> Unfortunately I don't know about JXTemplate. The solution in the js 
> file above would be a manipulation in the flowscript, but it seems not 
> the appriopriate place in your case. It was about getting a parser, 
> parsing a string (in the sample it loaded it from a file) and working 
> with the XML. But if you don't find a JXTemplate solution you can do 
> it the flowscript way and pass both the bean and the XML (DOM) to the 
> template.

Or, you could write a helper class (with a static method) to convert a 
string into a DOM. Then use that via JEXL: 
${MyClass.stringToDOM(myString)}. I think that's the right syntax. Is 
there any reason not to use that approach?

Regards, Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message