cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kröpfl <pe...@groebi.com>
Subject < > become &lt; and &gt; in jx file
Date Sat, 02 Apr 2005 12:52:51 GMT

Hi!

Data is passed from the flowscript to jx file.

unfortunately all the "<" and ">" characters in #{text} or #{header} are
displayed as &lt; and &gt; .
To be able to process them further I need them to be "<" and ">".


print in flow shows everything allright: 
commentlist.text: Testdata blabla <a href="testlink.html">TESTLINK</a>

However the xml produced by in the jx file looks like this:
<commenttext>
  Testdata blabla &lt;a href="testlink.html"&gt;TESTLINK&lt;/a&gt;
</commenttext>

Is there a way to prevent this behaviour in the jx transformation?


Thanks,
Peter


------------------ CODE ---------------------

--- flow snip ---
var commentlist = java.util.ArrayList();
commentlist = commentDAO.find("entry = " + entry.getId());

if (commentlist.size() > 0) {
 print("commentlist.text: " + commentlist.get(0).getText());
}
	
cocoon.sendPageAndWait("internal/generate-view/comments", {entry_id : eid,
commentlist : commentlist, entry : entry}

//everything seems allright allright


--- snip of the jx file ---

<comments>
    <c:forEach select="#{commentlist}">
                <comment>
                    <commentheader>	#{header}</commentheader>
                    <commenttext>	#{text}	</commenttext>                   
                    <commentdate>	#{date}	</commentdate>
                </comment>
    </c:forEach>
</comments>



--- sitemap snip ---

<map:match pattern="internal/generate-view/*">
  <map:generate src="views/{1}View.xml" type="file"/>
  <map:transform type="jx" label="jxDebug"/>
  <map:call resource="html"/>
</map:match>

<map:resources>
        <map:resource name="html">
            <map:transform src="xsl/standardformat.xsl">
            	<map:parameter name="base-url" value="/cocoon/homepage" />
            </map:transform>
            <map:serialize type="html"/>
        </map:resource>
    </map:resources>


------------- END CODE ----------------


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


Mime
View raw message