I’m trying to access a second xmldom in a loop.
<c:import var="some1xml" url="/xml/some1.xml"/>
<c:import var="some2xml" url="/xml/some2.xml"/>
<x:parse xml="${some1xml}" var="some1"/>
<x:parse xml="${some2xml}" var="some2"/>
<x:forEach select="$some1xml/config/seats/seat[@id > $Start and @id < $End]" var="seats">
<x:out select="$some2xml/root/name[@id='$seats/@id']"/>
</x:forEach>
But it won’t return me anything. Not even when I remove the xpath condition.
When I place it above the forEach it does return me data so the parse is succesfull.
What could be wrong or is this normal behaviour in JSTL?
The problem was the second xml document. The document had a documentRoot called root. Which confused the taglibrary. Removing the root in the xPath did the trick.