Skip to content

Conversation

@bsrouji
Copy link

@bsrouji bsrouji commented Jun 2, 2021

Fix comparison to respect -1, 0 or 1 return value, we can't assume returning 1 if col1 is lower than col2
Also improved comparison so when xml element have the same name and the same attributes, we shall then compare based on the xml content
for example:

<tests>
<test>2</test>
<test>1</test>
</tests>

should sort to:
<tests>
<test>1</test>
<test>2</test>
</tests>

bsrouji added 3 commits June 2, 2021 17:42
…turning 1 if col1 is lower than col2

Also improved comparison so when xml element have the same name and the same attributes, we shall then compare based on the xml content
for example:
<tests>
<test>2</test>
<test>1</test>
</tests>

should sort to:
<tests>
<test>1</test>
<test>2</test>
</tests>
@bsrouji
Copy link
Author

bsrouji commented Jun 3, 2021

I had to redo the fix and enable unit test that use your test_files
I also added a new h test case file
be aware I changed some of your _sorted files as with the new algorythm is sorting the innterxml when xmlelement and attributes are matching, also as we respect the return code (-1, 0, 1)

@kosi2801
Copy link

This improvement would be very appreciated. Is there any chance that this will be merged in the foreseeable future?
Or are there any parts missing or other reasons that require an improvement of this PR?

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