I am trying to use the c:import and x:parse tags within an x:forEach.
Is this possible?
If not, what is another way to import multiple xml sources depending on parsed data from another xml source?
<x:forEach select="$sitemap/pages/page" varStatus="status">
<x:set var="location_id" select="@id"/>
<c:import url="xml/pages/page${location_id}.xml" var="location_xml_var"/>
<x:parse var="location_xml" xml="${location_xml_var}" />
<x:out select="$location_xml/pages/page/@name" escapeXml="false"/>
</x:forEach>
This results in a
javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
error, on the x:parse.