Andreas Hartmann wrote:
> 
> Hi Frank,
> 
> Frank Hamilton schrieb:
>> I try make a rss reader in my publication with apache Rome.
>> I integrate Rome with lenya. In the java usecase handler get the content
>> of
>> notice like:
>> 
>> List<String> lst =   "<div >  ...  Notice1... </div>","<div >  ... 
>> Notice1... </div>",...
> 
> I would strongly discourage this, since you're mixing business logic 
> with layout.
> 
>> then setParameter("lst",lst) and I need put this html code in my jx file.
>> 
>> Using <jx:macro tag 
>> 
>> <jx:macro name="rss" targetNamespace="http://www.w3.org/1999/xhtml";>
>>      <jx:parameter name="list" />
>>      <jx:forEach var="item" items="${list}">
>>                      ${item}
>>      </jx:forEach>
>> </jx:macro>
>> 
>> <rss list="${usecase.getParameter('lst')}" />
>> 
>> But the xhtml result is :
>> 
>>  &lt;div &gt;&lt;img
>> src='http://infocar.dgt.es/etraffic/img/ICONenTABLAS/INCIDtablRETE.gif'
>> alt='RETENCION' title='RETENCION' class='ftl' /&gt;&lt;img ...
>> 
>> html entities apear in the code, i need write the <div tag ... to include
>> in
>> xhtml page.
>> 
>> It´s possible pass the ${item} like a html code not like a text.
> 
> Can't you use something like this?
> 
> List<String> lst = "Notice1", "Notice2", …
> 
> <jx:macro name="rss" targetNamespace="http://www.w3.org/1999/xhtml";>
>    <jx:parameter name="list" />
>    <jx:forEach var="item" items="${list}">
>      <div>${item}</div>
>    </jx:forEach>
> </jx:macro>
> 
> If you include the XML markup in the parameters, generating the view 
> will be very difficult, since you have to apply subsequent 
> transformations to parse the entities etc. I'd recommend to add all 
> markup in the JX template or in XSLT transformations.
> 
> -- Andreas
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 


Thank Andreas, the problem is that the param is like this:

<div class="incidenciaHome"  >
http://infocar.dgt.es/etraffic/img/ICONenTABLAS/INCIDtablCON.gif         
http://infocar.dgt.es/etraffic/img/ICONenTABLAS/NIVtablVERD.gif <strong>A-4
</strong>/ CARRIL INCORPORACION  CONOS / 07:06<abbr title='horas'>h</abbr> -
24-03-2009<br/> <p> SEVILLA  (SEVILLA) del km. 546.0 al 545.0. Sentido:
DECRECIENTE DE LA KILOMETRICA </p> </div>

Then I need to reparsen the outPut form Rome api and add all markup in jx.

Thanks.

-- 
View this message in context: 
http://www.nabble.com/jx%3Amarco-TAG-tp22680769p22681172.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to