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

Text-sort lines #346

Closed
ndw opened this issue Dec 17, 2019 · 5 comments
Closed

Text-sort lines #346

ndw opened this issue Dec 17, 2019 · 5 comments

Comments

@ndw
Copy link
Contributor

@ndw ndw commented Dec 17, 2019

The test suite results for the text-sort steps appear to be using newlines as separators:

<s:assert test="wrapper/text()='A&#xA;B&#xA;C&#xA;D'">Text is not sorted correctly.</s:assert>

I think each line, including the last line, should end with a newline. Why is separator better?

@xml-project

This comment has been minimized.

Copy link
Contributor

@xml-project xml-project commented Dec 18, 2019

@ndw Sorry, I do not get your point. Would you mind to reformulare the problem?

@ndw

This comment has been minimized.

Copy link
Contributor Author

@ndw ndw commented Dec 18, 2019

After sorting "C D B A" (for example), the test suite results expect

A&#10;B&#10;C&#10;D

That's using the newline as a separator. I think that each line should end with a newline:

A&#10;B&#10;C&#10;D&#10;

This could come down to just being a matter of opinion, but I wonder if you have a specific reason for the choice of separator.

@xml-project

This comment has been minimized.

Copy link
Contributor

@xml-project xml-project commented Dec 18, 2019

OK, now I see your point. We have different interpretation of

Lines are identified as described in XML, 2.11 End-of-Line Handling.

I understand "B A" as two lines (and so the sorted result should have two lines too). "B A " accordingly has three lines (the last one is empty). And the sort result is
" A B"

Did I get your point right? Do you think this is is a matter of opinion? I think we should fix this in the specs.

@ndw

This comment has been minimized.

Copy link
Contributor Author

@ndw ndw commented Dec 18, 2019

I agree we should fix it in the specs. I expect you're right, but it wasn't consistent with my experience. I'll do some more testing.

@xml-project

This comment has been minimized.

Copy link
Contributor

@xml-project xml-project commented Dec 21, 2019

I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.