Re: How to use following-sibling

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Thursday, March 18, 2010, 11:03:21 AM, Al Byers wrote:

> I have code like:
>
>   <#list .node?children as opt>
>       <#assign followingNode = following-sibling::opt/>
>
> ...
>
> It does not like the "::"
> I am obviously not using it correctly. Could someone please point out
> where I am going wrong?

That's not FreeMarker syntax, but XPath. Interpreting XPath is the
feature of the variables that were made by the DOM wrapper. So try:

  <#assign followingNode = opt["following-sibling::opt"]>

I'm also suspect you don't really want .node?children there, but
.node.opt. (See http://freemarker.org/docs/xgui.html for more.)

> Thanks,
>
> -Al

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.