• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How do I retrieve ancestor-or-self nodelist in a JSP page using the JSP XML taglibs?

 
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am developing a JSP-based breadcrumb component that reads in the following (similar) sitemap document:



and generates a breadcrumb based on the user's current URI. For instance, if the user's URI is currently '/roleAdd.html', the Breadcrumb would look as follows (with all the appropriate links taken from the file):



I am using the JSTL XML tag library to implement the breadcrumb. The code I am currently testing with looks as follows:



What I need to do in order to finish my breadcrumb is replace the line:



with one that looks something like the following:



This line would retrieve a nodelist consisting of all ancestors from the root of the tree directly to (and including) the node with the URI that the user is currently viewing. I can't seem to figure out the syntax for this though.

I am running Tomcat 6.0.18 with the latests versions of JSP and Xalan-j. Can someone tell me what the correct syntax should look like?

Thanks,
Darryl
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it.

The XPath expression that I need to use is:



Darryl
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic