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

Allow to sort the XML & fixes #3

Merged
merged 7 commits into from
Dec 2, 2022
Merged

Allow to sort the XML & fixes #3

merged 7 commits into from
Dec 2, 2022

Conversation

hoijui
Copy link
Contributor

@hoijui hoijui commented Dec 1, 2022

The sorting is probably quite buggy,
but for a first trial with a simple SVG from Inkspace,
it does what I want and the SVG is still valid
and looks the same.

To do this properly,
we would have to have the XSD style-sheet for the document,
and check for each element, whether it is a `xsd:sequence`,
and sort it only if it is not, because in seqeunces the order
of child elements matters.
@hoijui
Copy link
Contributor Author

hoijui commented Dec 1, 2022

I also have the code for xml-pretty ready already.

Copy link
Owner

@bbqsrc bbqsrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things I'd like changed if you don't mind. 😄

src/document.rs Outdated Show resolved Hide resolved
src/document.rs Outdated Show resolved Hide resolved
src/document.rs Outdated Show resolved Hide resolved
@hoijui
Copy link
Contributor Author

hoijui commented Dec 2, 2022

Should be done now

@bbqsrc bbqsrc merged commit 7865050 into bbqsrc:main Dec 2, 2022
@bbqsrc
Copy link
Owner

bbqsrc commented Dec 2, 2022

Thanks :)

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.

None yet

2 participants