Re: XPath function not() not working.
Kris Schneider <[email protected]>
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
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/>