cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: JX and nodes with appostrophes
Date Mon, 19 Jan 2004 20:45:17 GMT
On 19.01.2004 21:36, 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.
> 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.

Ah, I see, thanks for the info.


View raw message