-
Notifications
You must be signed in to change notification settings - Fork 64
Allow properties without values in viewport meta tags #2457
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you propose is fine and spec-wise correct. But I wonder whether in the following paragraph would not make it a bit more readable and more explicit to the casual reader by saying something like
Only the
height
andwidth
properties are required, by this specification, to have a value assignment, with the corresponding value requirement specified in . It imposes…
But I am fine if you prefer to leave it as is.
Ya, I was thinking of putting a note in saying it allows invalid properties, but didn't like saying it out loud. Reinforcing we have name/value requirements for height/width isn't a bad thing Looking over the full section, though, I found some further inconsistencies to clean up:
Finally, I put the text about the required properties and values into the note that discourages other uses, plus added some text that we don't even require values for other properties. That leaves all the processing normative, rather than interspersing some text about why we have this syntax. It's not as immediate as saying why we have the syntax right after the ebnf, but feels a little clearer for reading (we also mention it's for fxl height and width in the intro, so it's plenty covered now). |
Looks fine to me, and there is a clearer separation between the Syntax of the tag and the definition of what w/h are for. One minor thing. In the meantime, I merged the PR on viewport setting, which included this:
I presume that should still stay and github's merge magic will take care of that... |
Ya, it's still there, but does it make sense to have that specific a restriction in the general syntax definition? If we want to make it exclusive to height and width, then shouldn't that be part of section on setting the FXL dimensions? For now, I've tweaked the paragraph to say that all duplicate definitions are illegal and put width and height into a parenthetical. |
As we do not put any restrictions on other parts of the definitions, making any statement (even duplication) on a term other than w/h may not be appropriate. And you are right that, in this new setting, the statement should probably go to the FXL definition. |
Right, and I woke up this morning thinking that we should also be saying something about not including duplicate definitions by having multiple viewport tags, since reading systems are supposed to ignore subsequent ones. I've moved the restriction and also added that clarification into it. |
It looks good to me now. B.t.w., the RS spec already says, in the section on ICB §8.1.2. how to handle multiple viewport declarations, which is good; all loose ends are now tied. It's a go for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my EPUBCheck hat on, this PR clarifies the duplication issue, which is good. Note that it does introduce a backward incompatibility, since we did allow that before.
Outside of EPUBCheck's consideration, my own stance, as you know, is that ideally this would be better handled algorithmically, which would allow some well-defined error handling and fully specify the RS interpretation.
That said, given the complexity of coming up with an algo and the lateness of the issue, I understand it's not optimal here 😊.
A careful reader might wonder why the EBNF explicitly allows some invalid forms (value-less keys) while forbidding others (e.g. leading or trailing separators). But practically I don't think it will happen often with real-world content, so whatever the EBNF allows/restricts is probably ok!
Right, I don't think anyone is going to care given that the viewport meta tag has only one purpose in fixed layouts. We could add a note clarifying that the syntax is meant to be as loose as possible to ensure that (invalid) properties we don't care about don't invalidate the publication, but this is all a technical detail related to W3C process. I doubt authors will notice we even have our own syntax, let alone try to decipher the EBNF! They'll just copy the examples. |
@rdeltour would this solve your concerns about not blocking EPUB publications with (potentially) invalid property definitions because epubcheck will complain?
Really, what other data is in the tag isn't our concern since it isn't even supposed to be used, so by making the assignment operator and value optional, that should allow any weird combinations through (or future valid declarations that don't require a value, if such things ever come to pass).
Our requirement for a valid height and width declaration will still capture what we need even with this change.
Preview | Diff