cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: LuceneIndexContentHandler
Date Thu, 11 Mar 2004 23:21:21 GMT
On 11.03.2004 20:50, Joerg Heinicke wrote:

> Replace the startElements in your sample with endElements and it won't 
> work. But adding if(flag) like above additionally to endElement should 
> fix this. Did we get it now? :)

I have it done like the following

characters
     flag = true

endElement
    if(flag)
       append(' ');
       flag = false;

startElement
    if(flag)
       append(' ');
       flag = false;

But after having the closer look on the code I really wonder why my 
original proposal doing it in endElement depending on the text test 
should not work. The text only contains child::text() (to say it in 
XPath) and through the stack the text is completely reordered depending 
on the order of the endElement tags in the file:

<element>
     text1
     <element>
         text2
     </element>
     text3
</element>

should end in

"text2 text1 text3", shouldn't it? And this should be doable through the 
text test in endElement.

Joerg

Mime
View raw message