Summary: | using Node variables with JSTL XML tags | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Flavio <flaviotordini> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1.1.0 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other | ||
Attachments: | Patch for XPathUtil.java |
Description
Flavio
2004-09-09 16:18:31 UTC
I've got what appears to be a working fix, but I'll want to post a patch for review as opposed to blindly committing it. I'm just not that familiar with the nuances of XPathUtil. Patch to follow, hopefully tonight. Created attachment 12691 [details]
Patch for XPathUtil.java
Maybe there is another (faster) way to achieve the same result. instead of creating a new Document and prepend "/*" to the original XPath, we may simply remove the starting slash from the XPath. xpath = xpath.substring( xpath.indexOf("/")); (XPathUtils 648) would become: xpath = xpath.substring( xpath.indexOf("/") + 1); Then evaluate the XPath with the original Node as its context. I don't know if this may have side-effects, but I think this is the way to go. What do you think? flavio I tested Flavio's fix and found that it did not work in all cases. Tested and verified Kris Schneider's fix and committed it to the JSTL 1.1.x workspace. |