Rewrite - #88
Open
Ms2ger wants to merge 67 commits into
Open
Conversation
These can be used directly from Infra
This does not solve all potential issues: if there it both a double and a single quote in the ID, there is no valid representation. However, this change allows round-tripping parsable XML, and matches Firefox's behavior. Fixes w3c#71.
Ms2ger
added a commit
to Ms2ger/html5ever
that referenced
this pull request
Aug 17, 2026
In servo#586, it turned out that a targeted change to preserve xmlns attributes exposed issues in the XML serializer that caused test failures in Servo. This change brings the XML serializer in line with the specification and mostly with other browsers. The XML serializer needs to keep track of state related to namespaces and their prefixes. Implementing this correctly is not workable using a unified trait between HTML and XML. This is a breaking change: to serialize to XML, users now need to use the new xml5ever::serialize::XmlSerializer. This implements the DOM Parsing and Serialization specification including the changes from <w3c/DOM-Parsing#88>. Fixes servo#569. Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Devon Govett <devongovett@gmail.com> Signed-off-by: Ms2ger <Ms2ger@gmail.com>
Ms2ger
added a commit
to Ms2ger/html5ever
that referenced
this pull request
Aug 24, 2026
In servo#586, it turned out that a targeted change to preserve xmlns attributes exposed issues in the XML serializer that caused test failures in Servo. This change brings the XML serializer in line with the specification and mostly with other browsers. The XML serializer needs to keep track of state related to namespaces and their prefixes. Implementing this correctly is not workable using a unified trait between HTML and XML. This is a breaking change: to serialize to XML, users now need to use the new xml5ever::serialize::XmlSerializer. This implements the DOM Parsing and Serialization specification including the changes from <w3c/DOM-Parsing#88>. Fixes servo#569. Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Devon Govett <devongovett@gmail.com> Signed-off-by: Ms2ger <Ms2ger@gmail.com>
Ms2ger
added a commit
to Ms2ger/html5ever
that referenced
this pull request
Aug 25, 2026
In servo#586, it turned out that a targeted change to preserve xmlns attributes exposed issues in the XML serializer that caused test failures in Servo. This change brings the XML serializer in line with the specification and mostly with other browsers. The XML serializer needs to keep track of state related to namespaces and their prefixes. Implementing this correctly is not workable using a unified trait between HTML and XML. This is a breaking change: to serialize to XML, users now need to use the new xml5ever::serialize::XmlSerializer. This implements the DOM Parsing and Serialization specification including the changes from <w3c/DOM-Parsing#88>. Fixes servo#569. Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Devon Govett <devongovett@gmail.com> Signed-off-by: Ms2ger <Ms2ger@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My vacation project got a bit out of hand. This contains mostly editorial changes to improve cross-referencing, clarify prose, and make the variable tracking in respec work. It also fixes a few easy bugs at the end. All commits should be self-contained.
I can't commit to taking over maintenance, but this should be helpful in case anyone would step up to do so.