You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Konstantin Piroumian <KP...@flagship.ru> on 2000/10/17 16:05:17 UTC

Howto FP taglib and XPath.

Dear all!

I need to load a node-set from XML file and the XPath to the node list is
generated from the request.
But I cannot find the correct expression to load it.
This is from my XSP file:
<!-- I am trying to load a list from the given range (skip+1, rangeEnd) -->
  <fp:resource id="subs">
   <fp:resource-file>subscribers-db.xml</fp:resource-file>
   <fp:resource-node>/page/client/subscribers/subscriber[position() &gt;
<xsp:expr>skip</xsp:expr> and position() &lt;
<xsp:expr>rangeEnd</xsp:expr>]</fp:resource-node>
  </fp:resource>

Then, I need to place it here:

<subscribers>
    <fp:read select="*" from="subs" as="node"/>
   </subscribers>

And this does not work.
I thank that the error is in the * sign - cause it corresponds to children
of the current node.
When I use '.' - current node - it displays onlu the first item in the list.
Other XPath expression does not work (following-sibling, self, etc).

I will be very thankful for any help.

Regards,
  Konstantin Piroumian.
kpiroumian@flagship.ru