In reference to: https://twitter.com/nnethercote/status/866792097101238272

Is the rewrite meant to replace expat only or also some of our old
code on both above and below expat?

Back in 2011, I wrote a plan for rewriting the code around expat
without rewriting expat itself:
https://wiki.mozilla.org/Platform/XML_Rewrite
I've had higher-priority stuff to do ever since...

(The above plan talks about pushing UTF-16 to the XML parser and
having deep C++ namespaces. Any project starting this year should make
the new parser use UTF-8 internally for cache-friendliness and use
less deep C++ namespaces.)

Also, I think the decision of which XML version to support should be a
deliberate decision and not an accident. I think the reasonable
choices are XML 1.0 4th edition (not rocking the boat) and reviving
XML5 (original discussion: https://annevankesteren.nl/2007/10/xml5 ,
latest draft: https://ygg01.github.io/xml5_draft/). XML 1.1 is dead.
XML 1.0 5th edition tried to have the XML 1.0 cake and eat the XML 1.1
cake too and expanded the set of documents that parser doesn't reject.
Any of the newly well-forming documents would be incompatible with 4th
ed. and earlier parsers, which would be a break from universal XML
interop. I think it doesn't make sense to relax XML only a bit. If XML
is to be relaxed (breaking interop in the sense of starting to accept
docs that old browsers would show the Yellow Screen of Death on), we
should go all the way (i.e. XML5).

Notably, it looks like Servo already has an XML5 parser written in Rust:
https://github.com/servo/html5ever/tree/master/xml5ever

The tweets weren't clear about whether xml5ever had been considered,
but https://twitter.com/eroc/status/866808814959378434 looks like it's
talking about writing a new one.

It seems like integrating xml5ever (as opposed to another XML parser
written in Rust) into Gecko would give some insight into how big a
deal it would be to replace Gecko's HTML parser with html5ever
(although due to document.write(), HTML is always a bigger deal
integration-wise than XML).

(If the outcome here is to do XML5, we should make sure the spec is
polished enough at the WHATWG in order not to a unilateral thing in
relative secret.)

-- 
Henri Sivonen
[email protected]
https://hsivonen.fi/
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to