velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soren Praestegaard" <so...@priestyard.dk>
Subject RE: To many iterations in DVSL foreach directive
Date Mon, 12 Jul 2004 17:43:23 GMT

It seems a little illogical to me, that the text value of an element is
returned as one of the nodes, cause in my first example, where I did not
alter the source code, the iteration looped three times pr. Element
node, witch means that the DVSL engine treats all white spaces as one
node each. That can't be so, or what?

BTW, how do you check that the node is an element? It doesn't say so on
the DVSL homepage, and is there any other good resource on the not,
concerning DVSL?

Thank's Soeren Præstegaard



Christoph Reck wrote:
>Hi,
>
>the iterator is also returning the text nodes (containing whitespaces).

>So check that it is an element node before accessing $field.name().
>
>Cheers,
>Christoph




----------------------------------------
Min mail er beskyttet af SPAMfighter
2070 spam mails er blokeret indtil videre.
Hent gratis www.spamfighter.dk i dag!


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message