cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <>
Subject Re: XPath with FP Taglib
Date Fri, 27 Oct 2000 08:38:44 GMT
Jeremy Quinn wrote:
> ><fp:resource-node>/root/item[id=count(//item)]</fp:resource-node>
> you have selected the reference item
> ><fp:default-mode>insert-after</fp:default-mode>
> you create a new item after it (Yea, sorry, this is the *other* way Nodes
> get created ;)
> >
> >This selects the last item, the ids are numbered from 1 to 18 (which is
> >currently the last item). Now I do, as you suggested:
> >
> ><fp:write to="resource" select="item">
> >...
> ></fp:write>
> With the new <item/> as your context, you ask it to create a new <item/>
> try this :
> <fp:write to="resource" select=".">
> ...
> </fp:write>
> this should select your <item/> (or is that only working in fp2?)

This doesn't work either. It writes nothing new to my file, but it
appears that the last <item/> was rewritten, because it is all on one
line now, before it was on multiple lines. The problem remains the same:
either I select /root as context, in which case fp cannot add items,
because it would select multiple items to write to. Or I select an
existing item as context, in which case stuff gets written to this item,
instead of next to it.


Ulrich Mayring
DENIC eG, Systementwicklung

View raw message