You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Leangen <dl...@canada.com> on 2004/05/01 14:10:38 UTC

JXTemplate - forEach

I have a question about jx:forEach.

I would like to consistently use either Jexl or JXPath. In my case, I have
chosen JXPath.

I have a <jx:forEach> construct as follows:

  <jx:forEach select="#{pageComponents}">
    <ci:include src="skins/#{skinName}/#{.}.xml"/>
  </jx:forEach>


The problem is that I am getting this error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
file:/path/to/jx/file:org.apache.commons.jxpath.JXPathException: No pointer
for xpath: skinName



However, if I do the following (with Jexl), everything is ok:

  <jx:forEach select="#{pageComponents}">
    <ci:include src="skins/${skinName}/#{.}.xml"/>
  </jx:forEach>


The following also causes no problems when the #{skinName} is not inside the
<jx:forEach>:

    #{skinName}

  <jx:forEach select="#{pageComponents}">
    whatever
  </jx:forEach>


So this is really related to the use of a JXPath expression in the
<jx:forEach> construct.


Can anybody explain why this is happening?


Thanks!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org