Re: Feedback on XML content sink plans
Henri Sivonen <[email protected]> Mon, 12 Jun 2006 21:29:39 +0300
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, Boris Zbarsky <[email protected]> wrote: > Henri Sivonen wrote: > >> > Don©t be incremental with DOM LS. > >> > >> I don't believe we implement that, do we? > > > > What's nsLoadSaveContentSink for? > > DOM LS. But if you note, it's not actually compiled. ;) OK. :-) > > Perhaps forking it isn't a good idea after all. Would it be smart to > > move SinkContext into a separate .cpp/h file pair and inherit an > > nsHTMLSinkContext and an nsXMLSinkContext so that the XML side would > > only have one context? > > Hmm... That might be a reasonable approach... I started doing that today. Now I am having serious second thoughs. First, the SinkContext is very HTML-specific--the HTMLness all over it so that it is hard to factor out without breaking the HTML side. Second, spreading the use of SinkContext would make it more entrenched and would probably raise the barrier of getting the eight-year-old HTML parser/sink combo replaced with a line-by-line implementation of the HTML5 parsing spec. And the more I read the code, the more I'd like to see an HTML5-compliant rewrite. Third, the code of the XML content sink is a lot cleaner to begin with than the code of the HTML content sink, so it would be a shame to make the XML side more convoluted just to share code that isn't particularly shareable. I think I'll roll my tree back and return to my plan of picking lines of code to imitate on the XML side. -- Henri Sivonen [email protected] http://hsivonen.iki.fi/