Joerg Heinicke wrote:

On 16.01.2004 17:28, Christopher Oliver wrote:

It appears that your DOM object contains multiple text nodes under the title element. How was it created? Can't you just use #{./title} or #{string(./title)}?


But even with mixed content text() should return all text nodes. And how is it related to the postrophes? Sounds weird and more like a bug.

Joerg

I guess it is a bit weird. But with JXPath, the caller has to decide whether you want to treat the result of the evaluation as a single node (getPointer(), getNode()) or as a node set (iteratePointers(), iterate()). JXTemplate uses the former except in <forEach>. However, by explicitly utilizing the string() function you can convert a node set to a string value within the expression itself to overcome the single node behavior.

Chris

Reply via email to