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

Value of dc:language must be well-formed language tag #1221

Closed
mattgarrish opened this issue Mar 14, 2021 · 0 comments
Closed

Value of dc:language must be well-formed language tag #1221

mattgarrish opened this issue Mar 14, 2021 · 0 comments
Labels
spec: EPUB 3.3 Impacting the support of EPUB 3.3 status: completed Work completed, can be closed
Milestone

Comments

@mattgarrish
Copy link
Member

Not sure our current pattern for well formedness matches BCP47. Looks much weaker.

w3c/epub-specs#1325

@mattgarrish mattgarrish added the spec: EPUB 3.3 Impacting the support of EPUB 3.3 label Mar 14, 2021
@rdeltour rdeltour added this to the v5.0.0-beta-1 milestone Nov 12, 2021
@rdeltour rdeltour added the status: in progress The issue is being implemented by the development team label Nov 13, 2021
rdeltour added a commit that referenced this issue Jul 8, 2022
In Package Document, the language tags appearing in the elements or attributes below
MUST be well-formed according to BCP47:
 - `xml:lang` attribute
 - `hreflang` attribute
 - `dc:language` element

For these values:
- the schema now only do basic datatype check (string, non-empty value when relevant)
- the well-formedness is checked with Java’s Locale.Builder#setLanguageTag() API
- a new check (OPF-092) is reported when an ill-formed value is found

See https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Builder.html#setLanguageTag-java.lang.String-

Fix #1221
Close #702
@rdeltour rdeltour added status: completed Work completed, can be closed and removed status: in progress The issue is being implemented by the development team labels Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.3 Impacting the support of EPUB 3.3 status: completed Work completed, can be closed
Projects
None yet
Development

No branches or pull requests

2 participants