Preserve xmlns attributes and rewrite the XML serialization algorithm - #772
Open
Ms2ger wants to merge 5 commits into
Open
Preserve xmlns attributes and rewrite the XML serialization algorithm#772Ms2ger wants to merge 5 commits into
Ms2ger wants to merge 5 commits into
Conversation
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>
Contributor
Author
|
Depends on Ygg01/xml5lib-tests#2 |
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.
In #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 #569.
Co-authored-by: Josh Matthews josh@joshmatthews.net
Co-authored-by: Devon Govett devongovett@gmail.com