Skip to content

Conversation

@mattgarrish
Copy link
Member

@mattgarrish mattgarrish commented Jul 5, 2022

This PR moves the EBNF to an appendix, leaving only prose requirements for the values of the required height and width definitions in the ICB section.

I've also stripped the ordering requirements from the meta definition. The ICB section already requires the two necessary properties, so the definition should be fine just stating that the tag contains one or more properties.

I've listed the six possible properties defined in the apple doc, but we could even make the name field a generic "? ascii characters ?" definition and not bother ourselves at all about what properties are allowed. (Keeping to the known set is probably best, though.)

I also added a note explaining what whitespace normalization entails, as I'm not sure the average author trying to understand the spec will get that this is a post-processed syntax. Then again, they probably won't be able to read the EBNF, either...


Preview | Diff

@iherman
Copy link
Member

iherman commented Jul 6, 2022

This is just after a quick glance, will do a more thorough review when I am back from vacations...

If I was a first time reader of this spec I would be really messed upon why on earth are these guys bothering with the introduction of those terms in the section that seem to be unnecessary (e.g., initial-scale). In this respect, I preferred the extended EBNF syntax that you proposed in another PR that left open the other possible terms (and we can put a reference to the apple spec). That PR also had a reference to history as for why we bother in the first place (because we try to be backward compatible, that is). I also think that we should try to be a bit more forthcoming in saying that authors should not use those other property values and reading systems should ignore them.

(I like the idea of moving the formal grammar to the appendix, b.t.w.)

@mattgarrish
Copy link
Member Author

mattgarrish commented Jul 6, 2022

I preferred the extended EBNF syntax that you proposed in another PR that left open the other possible terms

Ya, I was thinking this morning that we don't want to validate for names, but that's probably where it leaves us if we're too specific. I've changed the definition to:

name = "height" | "width" | ? character data ? ;

It just feels like we should list the two properties that we're expecting to be set. That's what initially led me to list all the ones from the apple def, but I think the above is a good compromise.

I also think that we should try to be a bit more forthcoming in saying that authors should not use those other property values and reading systems should ignore them.

Other than discouraging their use we fall into the trap of potentially invalidating existing content.

But if reading systems have to ignore everything but height and width in fxl documents, then does it become required that they completely ignore viewport meta declarations in reflowable? It would be weird to disallow it in one rendering and not in the other.

Another question is what is a reading system supposed to do if there is more than one viewport declaration? If it uses the first, what if it's invalid? It's not like viewBox where you can only have one declaration.

clarify height and width are required properties;
add informative label to viewport intro;
caution against using other property values;
add requirement for RS to strip non-numeric character data and use resulting number as the dimension;
add requirement to use first viewport declaration if more than one;
add new section to ignore viewport meta declarations
@mattgarrish
Copy link
Member Author

The key changes in the last commit are:

  • the ebnf definition is more generic than I mentioned in my last comment. It's just "? character data ?" now, as we define the height and width requirements in the fxl section. The default definition can be as simple as possible.
  • it adds a clarification that height and width are required properties as changing the definition meant we only had requirements on the values
  • it adds a requirement for RS to strip non-numeric character data and use resulting number as the dimension.
  • it adds a requirement to use first viewport declaration if more than one (if this ends up being invalid, then the result would be that device-width and device-height are used as the defaults)
  • it adds a new section to ignore viewport meta declarations in both reflow and fxl (except for getting icb dimensions)

The latter has me the most concerned, as I'm not sure what effect setting things like initial-scale has in an epub. It's necessary for mobile, so if the document gets read in a mobile RS is it good practice to set these properties?

Do we need to tell reading systems anything about other properties when they aren't in scope of the ICB calculation?

Copy link
Member

@iherman iherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all these comments are fairly simple. I would propose to handle these and the merge this. We have beaten this issue to death, we have a WG agreement to do this, and if there are minor issues we can handle them separately.

@iherman
Copy link
Member

iherman commented Jul 18, 2022

Just note for archival purposes: this PR grew out of the extensive discussions in #2341; it was simpler to put everything into a new PR rather than carry on over there. But the technical discussions in #2341 are certainly "part" of this PR, too.

Co-authored-by: Ivan Herman <ivan@w3.org>
mattgarrish and others added 7 commits July 18, 2022 15:10
Co-authored-by: Ivan Herman <ivan@w3.org>
Co-authored-by: Ivan Herman <ivan@w3.org>
Co-authored-by: Ivan Herman <ivan@w3.org>
Co-authored-by: Ivan Herman <ivan@w3.org>
Co-authored-by: Ivan Herman <ivan@w3.org>
@iherman iherman merged commit f1358dd into main Jul 19, 2022
@mattgarrish mattgarrish deleted the fix/issue-2292 branch July 19, 2022 11:53
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.

3 participants