Re: XPath function not() not working.
Kris Schneider kris at dotech.com writes: Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) I try to put a valid id directly, without using the request parameter. x:when select=not($xml/books/book[id='1']) The problem still occur. Thank for your reply. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XPath function not() not working.
For Standard 1.1, XPath support is based on Xalan (for 1.0, it's based on Jaxen/SAXPath). How do you have Xalan installed and which version are you using? Sébastien Brodeur wrote: Kris Schneider kris at dotech.com writes: Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) I try to put a valid id directly, without using the request parameter. x:when select=not($xml/books/book[id='1']) The problem still occur. Thank for your reply. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XPath function not() not working.
Here's what may be a workaround. I'm not sure of the root cause yet, but try this: x:set var=nodeSet select=$xml/books/book[id=$param:bookId]/ x:choose x:when select=not($nodeSet).../x:when x:otherwise.../x:otherwise /x:choose Kris Schneider wrote: For Standard 1.1, XPath support is based on Xalan (for 1.0, it's based on Jaxen/SAXPath). How do you have Xalan installed and which version are you using? Sébastien Brodeur wrote: Kris Schneider kris at dotech.com writes: Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) I try to put a valid id directly, without using the request parameter. x:when select=not($xml/books/book[id='1']) The problem still occur. Thank for your reply. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XPath function not() not working.
Hi folks, We used in the past JSTL 1.0, we are in the process of migrating to JSTL 1.1. I can't have the XPath not() function working in a x:when expression. The expression is always returning true when I test if a node exist. I try the simpless form I can think. I test not(true()) and not(false()). Both return the good answer. But when I test a select expression (ex. x:when select=$xml/books/book[id=$param.bookId]) it doesn't work. I try the expression in a x:out and I get a valid value so I know the expression return a node. We use WebSphere 6.0 on AIX 5.3. The original code was working fine using JSTL 1.0 and WebSphere 5 on AIX 5.3. Any idea beside using Tomcat instead :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XPath function not() not working.
Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) Sébastien Brodeur wrote: Sébastien Brodeur brodseba at gmail.com writes: I want to clarify my post. I check the JSTL 1.1 Specification Maintenance Release, but I found nothing helpful (except the change in x:forEach having now a varStatus attribute and the fact that the c:forEach can no longer use a X tags select to iterate. A change not highlight into the Appendix A by the way.) This code work fine using JSTL 1.0, but not with JSTL 1.1. The expression ($xml/books/book[id=$param.bookId]) ALWAYS return false, so I ALWAYS got not(false()) x:choose x:when select=not($xml/books/book[id=$param.bookId]) %-- There is no valid node in the xml --% /x:when x:otherwise %-- Do something with the xml. --% /x:otherwise /x:choose The easies solution seem obvious. I should remore the not() and swap the code segment from when to otherwise. But not() should work God d**m it. We have also problem using the AND and OR operator in XPath expression. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]