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

epubcheck 4.2.0.-beta: class values for HTML5:link #989

Closed
Doktorchen opened this issue Mar 1, 2019 · 2 comments · Fixed by #1470
Closed

epubcheck 4.2.0.-beta: class values for HTML5:link #989

Doktorchen opened this issue Mar 1, 2019 · 2 comments · Fixed by #1470
Assignees
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request
Milestone

Comments

@Doktorchen
Copy link

epubcheck 4.2.0.-beta reports about such content an error message:

"
<link href="stil.css" type="text/css" media="all"
title="dunkel auf hell" rel="Stylesheet" />
<link href="alt.css" type="text/css" media="all"
title="hell auf dunkel" rel="Alternate Stylesheet" />
<link href="no.css" type="text/css" media="all"
title="kein Stilvorlage" rel="Alternate Stylesheet" />
<link href="day.css" type="text/css" media="all" class="day"
title="Tag" rel="Alternate Stylesheet" />
<link href="night.css" type="text/css" media="all" class="night"
title="Nacht" rel="Alternate Stylesheet" />
<link href="grau.css" type="text/css" media="all" class="day horizontal allday"
title="grau 1" rel="Alternate Stylesheet" />
<link href="grau.css" type="text/css" media="all" class="night vertical allday"
title="grau 2" rel="Alternate Stylesheet" />
<link href="pogo.css" type="text/css" media="all" class="allday"
title="Pogo" rel="Alternate Stylesheet" />
"

The error messages goes like this:
"
ERROR(OPF-027): CSS_ein.epub/Inhalt/test2.xhtml(17,51): Undefined property: 'allday'.
ERROR(OPF-027): CSS_ein.epub/Inhalt/test2.xhtml(19,51): Undefined property: 'allday'.
ERROR(OPF-027): CSS_ein.epub/Inhalt/test2.xhtml(21,49): Undefined property: 'allday'.
"

Because epubcheck 4.2.0 checks HTML5.2 and EPUB 3.2, I had a look into these texts.

As for previous HTML5 versions, the class attribute still is a global attribute, the value is a set of space-separated tokens.
This applies to the usage in the example.
As always for class values - it is mainly the problem of the authors, what to indicate with it or for what to use it.

As far as I identified this in the EPUB 3.2 draft (it seems not to have a table of contents yet), there is no restriction mentioned for this attribute.

EPUB3.x mentions the usage, but it defines only a specific meaning of a few tokens, that may be used, it does not say, that authors must not use other tokens.
A referenced recommendation http://www.idpf.org/epub/altss-tags/ indicates only mutually exclusive pairs of tokens, but does not exclude other tokens.

Additional problem of epubcheck: It is possible as well to note mutually exclusive tokens like class="day night", the recommendation only notes:
'If two style sheets within a style set are tagged with mutually exclusive tags, both tags are ignored.' (not mentioned at all, what to do, if one style sheet is tagged with mutually exclusive tags).
My own interpretation would be, that the alternative style is applicable both for day and night, respectively horizontal or vertical alignment, but such a case is not considered yet, but it may apply, if there is a larger list of alternative styles, the audience may have the choice.

Error message from epubcheck goes like this:
ERROR(CSS-005): CSS_ein.epub/Inhalt/test2.xhtml(11,61): Conflicting alternate style attributes found: day night.

Would be enough to provide an info, that the tagging state is undefined in such a situation.

Therefore these seem to be a bugs of epubcheck 4.2.0.-beta to report errors here, right?

@rdeltour
Copy link
Member

rdeltour commented Mar 1, 2019

Yes, looks like EPUBCheck is a tad overzealous here. @mattgarrish can you confirm?

@rdeltour rdeltour added status: accepted Ready to be further processed spec: EPUB 3.x Impacting the support of EPUB 3.x specifications labels Mar 1, 2019
@mattgarrish
Copy link
Member

Yes, there was never a restriction on use, but I'd drop this in the very low priority bucket. We've stopped referencing alternate style tags as it's another of the mostly unimplemented technologies.

@rdeltour rdeltour added this to the v5.0.0-rc milestone Dec 8, 2022
@rdeltour rdeltour self-assigned this Dec 15, 2022
rdeltour added a commit that referenced this issue Dec 30, 2022
A class name found on a `link` element representing a style sheet was
reported as an error when it was not one of the known keyword defined
in [EPUB Alternate Style Tags](https://idpf.org/epub/altss-tags/).

This commit fixes that by allowing any name in the class attribute.

This commit also downgrades `CSS-005` to a usage; it is reported when
two mutually-exclusive class names are used on the same link element.
EPUB Alternate Style Tags defines these as mutual exclusive names, but
it is mostly unimplemeneted and this was never strictly forbidden.

Fix #989
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants