Hi, 

I'm having trouble using JEXL or JXPath within a JXTemplate.  I have defined
a jx file that imports XML content and then based on the imported content,
performs operations (e.g. iterate, etc).  I can import an XML tree and
assign that to a jx var, but cant then traverse the tree to use the content. 
My code currently looks like this: 

<jx:set var="personaList">
 <jx:import uri="http://somehost/personas?name=test&amp;namespaceId=2547"/>
</jx:set> 
 <br/><br/>

 <jx:out value="${personaList}"/> 

 <jx:forEach select="#{personaList/personas[position() &lt;=
count(personas)]}"> 
   <jx:out value="#{./personaUri}"/>
 </jx:forEach>  

the import returns the following content: 

<personas>
<personaUri>/users/304098/personas/81902</personaUri>
<personaUri>/users/292344/personas/81900</personaUri>
<personaUri>/users/292344/personas/81901</personaUri>
<personaUri>/users/307491/personas/86650</personaUri>
<personaUri>/users/307690/personas/86651</personaUri>
<personaUri>/users/304098/personas/99300</personaUri>
<personaUri>/users/292344/personas/103895</personaUri>
<personaUri>/users/322186/personas/103896</personaUri>
<personaUri>/users/322189/personas/103897</personaUri>
<personaUri>/users/304098/personas/105253</personaUri>
</personas>

How can I iterate through the tree?  I think the problem is in nominating
the variable as the root node of the DOM so that the XPath can traverse the
tree.  I've tried all sorts of variations and cant make it work.  Is there
some other way to do this?

Your help would be appreciated! 

Thanks,
JD
-- 
View this message in context: 
http://www.nabble.com/JXTemplate-parsing-imported-XML-tf3495135.html#a9762443
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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

Reply via email to