tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Ramsey" <...@eureka-interactive.com>
Subject Can you nest <x:forEach>?
Date Sat, 24 Aug 2002 18:27:56 GMT
I'm trying to run some code that looks like this:

<c:import
url="http://www.joeykratz.com/data/xml/${param.section}/archive.xml"
var="xmlArchive"/>
<x:parse xml="${xmlArchive}" var="docArchive"/>
<x:forEach select="$docArchive//archive">
    <p class="archiveHeading"><x:out select="title"/></p>
  <c:set var="xmlFileName">
    <x:out select="@id"/>
  </c:set>
  <c:import
url="http://www.joeykratz.com/data/xml/${param.section}/${xmlFileName}"
var="xmlArticles"/>
  <x:parse xml="${xmlArticles}" var="docArticles"/>
  <x:forEach select="$docArticles//article"/>
    <p class="headline"><a href="/article.jsp?section=<c:out
value="${param.section}"/>&amp;data=<c:out
value="${xmlFileName}"/>&amp;artid=<x:out select="@id"/>"><x:out
select="title"/></a></p>
  </x:forEach>
</x:forEach>

But I get an "javax.servlet.ServletException: End of content reached while
more parsing required: tag nesting error?" error.

Bascially, the parent forEach goes through each item in one file, pulls an
id number, which is a reference to another file.  Then it imports that other
file, parses it, and iterates through the items in it (with forEach) before
returning again to the parent forEach.

Perhaps I'm just missing something in my code--or maybe I'm not supposed to
next forEach tags.  Could someone please help?

Thanks,

Ben Ramsey
Technical Director
EUREKA! Interactive, Inc.
770-642-0390
www.eureka-interactive.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message