-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement full XML serialization for nodes #368
Comments
Ok, I'm down with doing this. My biggest questions are. Should this also add fragment parsing (#271)? Also while digging through the code I found #122 that might be tangentially related. Right now I'm implementing parts of XML parsing. I'll probably leave fragment parsing for another time and possibly see about fixing #122 at an even later date. |
I believe #122 is part of the full serialization algorithm, yes |
servo/servo#24920 looks like it's because of a step in this, "Elements not in the HTML namespace containing no children, are serialized using the empty-element tag syntax (i.e., according to the XML EmptyElemTag production). " |
@jdm yeah. I'm back on this issue. After a long time, I finally have time off. However I notice few problems.
What would be a preferred solution? For 1) can see adding extra Node variants, like |
Yeah, if we need to be able to represent more kinds of nodes then we should add those variants. As for question 2, modifying the Serializer trait to provide the information you require sounds reasonable. If we can pass an argument to start_elem instead of adding a new separate method that's only used by the XML serializer, that might be preferable. |
This subject was progressed or we can work on it, to be a good starting point? If not, can you suggest another good first issue @jdm, thank you by now. |
The implementation in https://github.com/servo/html5ever/blob/master/xml5ever/src/serialize/mod.rs is fairly simplistic, and does not reflect the complexity described by https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization.
The text was updated successfully, but these errors were encountered: