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

Input -> Parser -> Writer = Input #23

Open
burner opened this issue Jul 13, 2016 · 5 comments
Open

Input -> Parser -> Writer = Input #23

burner opened this issue Jul 13, 2016 · 5 comments

Comments

@burner
Copy link

burner commented Jul 13, 2016

Test if the above shown chain yield an output document where the content is equal to the original input.

Test that with all combinations of lexer, parser and writer.

@Hackerpilot
Copy link

xmllint's --format option can be used to standardize the formatting of an XML file so that you can use diff. This may simplify writing the tests.

@lodo1995
Copy link
Owner

@Hackerpilot thank you.
This will prove very useful, as it will allow me to test on the entire W3 Test Suite without worrying about formatting issues.

@lodo1995
Copy link
Owner

@burner Great news!
I had to change the way <!DOCTYPE nodes are handled, but now the library can input and output them easily. This was the only thing that prevented input -> parser -> writer = input to be tested.
Now make test (test driver at source/test.d) runs the chain on every valid file of the W3C XML Test Suite.
Currently the reported failure rate is ~11%, due to the fact that we don't preserve any whitespace, while xmllint preserves some of them (even if all files are normalized with options --pretty 2 --c14n11).

@burner
Copy link
Author

burner commented Aug 17, 2016

sweet! Awesome job.

If you have the time, maybe just compare the nodes and there attributes. That might give you a more realistic failure rate, but only if you have time.

@wilzbach
Copy link

This issue was moved to dlang-community/experimental.xml#8

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

No branches or pull requests

4 participants