Skip to content
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

svd: Put the XML declaration at the very top #8

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

tchebb
Copy link
Contributor

@tchebb tchebb commented Feb 4, 2021

According to the XML specification, the XML declaration (XMLDecl) is allowed only as the very first production in the prolog, which in turn can appear only as the very first production in the document. This means it must come before all comments or the XML file is invalid. Java and Python XML parsers fail on documents like this one which violate that part of the spec.

Move the declaration up so our SVD is valid XML.

According to the XML specification[1], the XML declaration (XMLDecl) is
allowed *only* as the very first production in the prolog, which in turn
can appear only as the very first production in the document. This means
it must come before all comments or the XML file is invalid. Java and
Python XML parsers fail[2] on documents like this one which violate that
part of the spec.

Move the declaration up so our SVD is valid XML.

[1] https://www.w3.org/TR/xml/#NT-prolog
[2] https://stackoverflow.com/a/19898942/6568778
@9names
Copy link
Collaborator

9names commented Feb 4, 2021

This obviously correct.
Thanks for the easy to approve PR

@9names 9names merged commit 43ac3df into sipeed:main Feb 4, 2021
@tchebb tchebb deleted the move-xml-declaration branch February 4, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants