kh at waikato.ac.nz
Tue Apr 3 07:01:39 BST 2007
Many thanks to John-Mark for sharing his thoughts with the wider
While there are some details where we might disagree (priorities is
one!) I certainly approve his analysis of the current state of play.
I see the major decision as being whether to SAX or not to SAX - so to
speak. I have used various utilities which have SAX-based parsers and I
have been very impressed with the way in which the DOM structure seems to
fall out of the way in which parsing is done. If my opinion is worth
considering, I would certainly vote for using SAX as a starting point for
Mk II Netsurf parsing/tree building.
Quite rightly you speak of what is going on elsewhere, particularly in
the world of xml and friends (svg, xslt, etc) and I have often wondered
whether building a rigid xml-based engine - with add-on grunges for bad
HTML fixing - might not be the best way to go. At least the 'product' of
that engine would be an acceptable DOM-based tree onto which the layout
engine could latch. I suspect that this could reasonably make the layout
engine more efficient too. Of course, I might just be being a little too
optimistic here, but I have often wondered why other browsers have not
adopted that approach - or to the best of my knowledge that isn't the case.
'Add-on grunges' of a rather more carefully crafted sort might then be
appropriate for things like plug-ins, xml events, etc - just a thought. By
the way, if I remember correctly when the Firefox people were considering
xml forms, one of the principal hiccups was the way in which they had
already implemented events - at too high a level in the engine. It might be
a good idea to get events down in the bowels of the engine (so, again, to
speak) to speed up event processing of all kinds. [If anyone is interested
I have a formally defined exception/event manager specification - in an
alpha state may I hasten to add!]
I am not going to advocate using xsfo as a layout engine (bit of a
sledge-hammer to crack a nut in some respects) - although it does have many
attractions, particularly for non-screen media - and it is just an (fairly
extensive I agree) extension of CSS2 ideas. I haven't recently looked at
the latest draft for the new version, but I notice a lot of its ideas
feeding back to CSS 3 modules (particularly ruby stuff). Might it be worth
looking at a structure which could (if eventually desired) be extended in
the xsfo way for printing purposes?? This might help integrate the printing
I'm no C programmer - more of a high-level language man - but I
suspect that several other developers might like the idea of the layout
engine library which you suggest.
Oh! Yes! I mentioned some disagreement on priorities - you may guess
that mine go DOM, xml/xhtml, css, html and possibly a plug-in ECMAScript
As someone who is not a direct contributor to the Netsurf work I don't
expect my ideas to count for a lot, but really, John-Mark, you have got me
all excited about xml again! Thanks!
Over to you all to laugh (or to cry!).
More information about the netsurf-users