Re: parser in Quanta
"Brian G. Peterson" <[email protected]>
| Newsgroups | gmane.comp.kde.devel.quanta |
|---|---|
| Message-ID | <[email protected]> |
On Friday 13 January 2006 06:16 am, Jens Herden wrote: > I would like to have a solution where we start the parsing and detect the > begin of a special area, switch the parse modus and switch back when we > detect the end of the special area. > So one parser run should be enough to parse the HTML/XML and through out > the special areas. Do you see any reason why this should not work? Streaming parsers generally perform better than multi-pass parsers, if only for reasons of memory allocation and access. I think it will be imporant to think about the caching of the (parsed) DTD, so that the parsing engine knows what special tags have been defined, and knows how they need to be handled *before* loading the target HTML/XML/other sourcecode file. As for the discussion of Javascript/PHP/etc inside some other tag (<script></script> or <?php ?>), I think that an editor parser/transformation/macro/special handling functionality really should apply to the contents of tags (including script code) and not just to HTML/XML/XHTML tags. Regards, - Brian