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

[fix #777] Allow xml:lang="" by replacing datatype.languagecode by datatype.languagecode | string "". #778

Merged

Conversation

murata2makoto
Copy link
Contributor

This pull request is to address #777.

@tofi86 tofi86 self-requested a review July 7, 2017 11:44
@tofi86 tofi86 assigned tofi86 and murata2makoto and unassigned tofi86 Jul 7, 2017
@tofi86 tofi86 added the bugfix label Jul 7, 2017
@tofi86 tofi86 added this to the 4.1.0 milestone Jul 7, 2017
@tofi86
Copy link
Collaborator

tofi86 commented Jul 7, 2017

Thanks, Makoto san, for providing this fix. Can you probably also add a Java-based unit test for an XHTML file containing this empty lang attribute?

However, if I should better add this, please don't hestitate to say so and I will add a test during review this weekend.

Thanks.

@tofi86 tofi86 changed the title Allow xml:lnag="" by replacing datatype.languagecode by datatype.languagecode | string "". [fix #777] Allow xml:lnag="" by replacing datatype.languagecode by datatype.languagecode | string "". Jul 7, 2017
@murata2makoto
Copy link
Contributor Author

I am afraid that I have not written a Java-based unit test before. Could you take care of it this time?

@tofi86
Copy link
Collaborator

tofi86 commented Jul 7, 2017

I am afraid that I have not written a Java-based unit test before. Could you take care of it this time?

Sure, no problem! 👍

@tofi86
Copy link
Collaborator

tofi86 commented Jul 10, 2017

Test results with 4.0.2 results in error as expected and reported in #777:

>java -Duser.language=en -Duser.country=US -jar epubcheck.jar --mode xhtml -v 3.0 "src/test/resources/30/single/xhtml/valid/issue777-empty-lang.xhtml"
ERROR(RSC-005): /src/test/resources/30/single/xhtml/valid/issue777-empty-lang.xhtml/src/test/resources/30/single/xhtml/valid/issue777-empty-lang.xhtml(8,26): Error while parsing file 'value of attribute "lang" is invalid; must be an RFC 3066 language identifier'.
ERROR(RSC-005): /src/test/resources/30/single/xhtml/valid/issue777-empty-lang.xhtml/src/test/resources/30/single/xhtml/valid/issue777-empty-lang.xhtml(8,26): Error while parsing file 'value of attribute "xml:lang" is invalid; must be an RFC 3066 language identifier'.

Check finished with errors

epubcheck completed

The version from this PR does not report an error anymore. Travis tests are running, will merge when finished...

@tofi86 tofi86 merged commit 392c2f6 into w3c:master Jul 10, 2017
@tofi86
Copy link
Collaborator

tofi86 commented Jul 10, 2017

Merged. Thanks!

@tofi86 tofi86 changed the title [fix #777] Allow xml:lnag="" by replacing datatype.languagecode by datatype.languagecode | string "". [fix #777] Allow xml:lang="" by replacing datatype.languagecode by datatype.languagecode | string "". Jul 16, 2017
@murata2makoto murata2makoto deleted the fix-777_empty_xml_lang branch July 27, 2017 01:49
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