cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Streaming strings in JXTemplate
Date Sun, 22 May 2005 07:12:09 GMT
Vadim Gritsenko wrote:
>> The main reason for using DOM in some cases (chosen by user at 
>> runtime) is the ability to avoid SAXException. SaxBuffer does not 
>> offer such functionality as it just stores sax bits and does not check 
>> if xml is well formed.
> 
> 
> And neither does DOM. So can you explain your point or give an example?
I'd like to implement something like:
<jx:out value="${str}" xmlize="true" lenient="true"/>

If @lenient="true":

1. cache SAX events from parsed ${str}
2. validate SAX stream somehow for well formedness (that is why I 
proposed DOM)
3. play SAX events into the main stream only if no SAXException occured 
previously.

Right now parsing a not well formed xml fragment into view's SAX stream 
will destroy the view completely.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message