> Jason Johnston escribió:
>>> Hi Jason,
>>>
>>> I tried this second option for the old JXTemplate and I was unable to
>>> see it working: Here is a non working test:
>>>
>>> <jx:set var="xhtmlContentTest" value="&lt;html&gt; Hello &lt;b&gt;
>>> world! &lt;/b&gt; &lt;/html&gt;"/>
>>>     <jx:out
>>> value="${Packages.org.apache.cocoon.xml.StringXMLizable(xhtmlContentTest)}"/>
>>>
>>> What I am doing wrong?
>>
>>
>> Hmm, looks OK to me.  The only thing I can think is that maybe you're
>> using JX without flow(script?)... I seem to remember reading somewhere
>> that you can only get access to Java classes if invoked from flow.
>>
> Hi Jason,
>
> Thanks for the quick response. :-)
>
> I am using flow for calling the jxtemplate.

Well that shoots down that theory ;-)

I checked some of my own code where this is working and see only these
differences:

1) The jx:set uses an expression to set its value rather than just a
literal value.  It seems both should produce a String, so this probably
isn't significant.

2) I do not use jx:out, but just write the jexl expression out as a text
node.  I thought the two are intended to behave the same, but perhaps not.

Here's my code snippet that is working:

<jx:set var="content" value="#{concat('&lt;div>', comment-content,
'&lt;/div>')}" />
${Packages.org.apache.cocoon.xml.StringXMLizable(content)}

--Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to