KEMBAR78
Add section on conformance checking by mattgarrish · Pull Request #2025 · w3c/epub-specs · GitHub
Skip to content

Conversation

mattgarrish
Copy link
Member

@mattgarrish mattgarrish commented Mar 2, 2022

This PR comes out of a discussion we had in the epubcheck group about using that tool to help with CR exit criteria.

In a nutshell, the specification doesn't currently say anything about validators except for the abrupt inclusion of requirements on "validation tools" in the sections on deprecated features.

To try and better address conformance checking as an outcome of the specification, I've made the following changes:

  • added a formal definition of an "EPUB Validator" and used the term to replace "validation tools" (intentionally trying to keep the definition lightweight, as I didn't want to start spewing lexical constraints and stuff like that!)
  • added a new section under the conformance criteria section that explains the requirements for conformance validation

I've also tried to address various issues that come up around validation - like how not all requirements are testable and why not following recommendations does not make a publication invalid (i.e., blanket rejection of warnings isn't a good idea).

I'm open to this being both too much and not enough. More of a starting point.


Preview | Diff

add section with requirements and explanation of conformance validation
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 am a bit worried about the usage of MUST-s and SHOULD-s in this section. Do we really think this section should be normative and therefore warrant these terms? If it is normative, then we have to check them, we have to formally test them, etc. I know this is doable because we do have epubcheck, but I wonder whether we create ourselves a bunch of problems for no good reasons. Flagging the section as informative (and turn all MUST-s and SHOULD-s into must-s and should-s) might be enough...

@mattgarrish
Copy link
Member Author

mattgarrish commented Mar 2, 2022

I am a bit worried about the usage of MUST-s and SHOULD-s in this section.

Right, I have the same concern, but I was trying to harmonize this with the fact that we normatively describe what validators have to do for handling deprecated features.

Maybe we should also remove the normative keywords from the deprecated features section and keep all talk of validators informative?

@rdeltour
Copy link
Member

rdeltour commented Mar 2, 2022

@iherman

I am a bit worried about the usage of MUST-s and SHOULD-s in this section. Do we really think this section should be normative and therefore warrant these terms?

I thought the point of this section was to justify using EPUBCheck for CR? If yes then we need it to be normative, no?

@mattgarrish
I too was originally confused by "requirements" vs. "recommendations". These are not defined anywhere as far as I can tell, specifically, not in RFC2119.

Does this section need to discuss severity at all?

What about using only something very generic along the lines of what is said in HTML:

Conformance checkers must verify that a document conforms to the applicable conformance criteria described in this specification.

and then precise that they checking scripts is optional.

@mattgarrish
Copy link
Member Author

These are not defined anywhere as far as I can tell, specifically, not in RFC2119.

I'd argue they're implicit in the definitions. A MUST is a requirement of its specification as are it's synonym (REQUIRED) and negative (MUST NOT).

But we can, of course, make this explicit.

@rdeltour
Copy link
Member

rdeltour commented Mar 2, 2022

I'd argue they're implicit in the definitions.

Yeah, it's too confusing IMO. Also, "requirements" is often use to encompass them all. For example, RFC2119 talks about varying "requirement levels", so RECOMMENDED is one specific requirement level 🙃. Another example is our own section titles ("XHTML Requirements"), or when we say things like "This specification defines the authoring requirements for EPUB Publications".

I would advise against using "requirements" vs. "recommendations" altogether.

@rdeltour
Copy link
Member

rdeltour commented Mar 2, 2022

But again I'm not sure why we need to make two distinct cases anyway, unless we really want to talk about severity (but then, why?).

What you're saying is basically: validator MUST report MUSTs, and SHOULD report SHOULDs.

What I'm proposing is: validator MUST check conformance, unless it's impossible to check by a machine in which case its OPTIONAL.

@mattgarrish
Copy link
Member Author

What about using only something very generic along the lines of what is said in HTML:

Ya, I had a look at that when I was writing the section up, but the sticking point (for me) is that we normatively say how to report the issues arising from unsupported features.

If we don't say how to report issues generally, why normatively say how to handle them there?

Once we start dropping the normative keywords we do end up back at a simpler statement like HTML makes, but it also suggests validators are outside the scope of the specification.

@iherman
Copy link
Member

iherman commented Mar 2, 2022

@iherman

I am a bit worried about the usage of MUST-s and SHOULD-s in this section. Do we really think this section should be normative and therefore warrant these terms?

I thought the point of this section was to justify using EPUBCheck for CR? If yes then we need it to be normative, no?

I do not think that is necessarily a conclusion.

If we define, normatively, the behaviour of an EPUB Validator, then we have to test that as part of CR. Ie, we have to test whether EPUBCheck is a conformant validator in CR, when we use EPUBCheck as a validator for CR... this is kind of a circular argument that I am not sure how to solve.

I do not see any issue if the full section is non-normative, setting informal expectation (and I believe having that section is a great idea!) and we rely on the community usage of EPUBCheck as part of the CR process.

@mattgarrish
Copy link
Member Author

If we define, normatively, the behaviour of an EPUB Validator, then we have to test that as part of CR.

Ya, this is what really worries me. We want epubcheck as a proof without it being subject to exit criteria itself.

See if the latest commit helps at all. I've made the validator section informative and rewritten it to tie it into being a proof of the enforceability of the specification requirements. I also took out the parts about reporting severity and instead tried to explain why reporting these issues is useful to authors.

I also changed the unsupported features so the statements about how to report the features are in notes.

@iherman
Copy link
Member

iherman commented Mar 3, 2022

See if the latest commit helps at all. I've made the validator section informative and rewritten it to tie it into being a proof of the enforceability of the specification requirements. I also took out the parts about reporting severity and instead tried to explain why reporting these issues is useful to authors.

I also changed the unsupported features so the statements about how to report the features are in notes.

That works for me, thank you.

Copy link
Member

@rdeltour rdeltour left a comment

Choose a reason for hiding this comment

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

TBH if this section is informative I'm not sure I understand how it improves the specification.

To paraphrase a bit, my understanding of this sections is:

  • 1st paragraph "authors should check their EPUBs" → I think that's an accepted practice already. At least to anyone reading this specification.
  • 2nd paragraph "EPUB checkers are useful if thorough" → OK…
  • 3d and 4th paragraph say "validator must check MUSTs and should check SHOULDs" → why not, but note that it's not the philosophy of EPUBCheck, which is more "must check everything when possible". Again I don't see how the differentiation between MUSTs and SHOULD is useful here?

Essentially I'm wondering: what are we exactly intending to clarify with this section?
Depending, maybe it can be condensed into a simpler note in the preceding "Conformance criteria" section?

conformant with this specification.</p>
</dd>

<dt><dfn id="dfn-epub-validator" data-lt="EPUB Validators">EPUB Validator</dfn></dt>
Copy link
Member

Choose a reason for hiding this comment

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

I personally prefer "conformance checker" instead of "validator". It is closer to spec language and is a bit less grim.

@mattgarrish
Copy link
Member Author

mattgarrish commented Mar 3, 2022

TBH if this section is informative I'm not sure I understand how it improves the specification.

It doesn't define validator requirements, but straying into those was always problematic. Short of writing rules on how to report every violation, it's pointless to sprinkle the specification with a few requirements on how to report issues. Adding a few more vague normative requirements isn't making things better.

Where I see it helping is in providing a place to surface notions about validation that we know to be true but have never been voiced. That recommended practices are not violations of the specification, for example. It may change nothing in the real world, but at least it documents that it's not the specification that is the issue when content is rejected for warnings.

It also provides a place to formally point readers to epubcheck, same as you can find your way to validator.nu from HTML's section.

Not everyone who arrives at the specification is going to understand conformance checking. The latest commit rewrites the section some more to focus it more directly on authoring concerns, so there's no focus on what a conformance checker is expected to do.

@mattgarrish
Copy link
Member Author

Can this be merged or do we need to discuss it any more?

@mattgarrish
Copy link
Member Author

As there hasn't been any further comment on this for a couple of weeks, I'm going to merge. If further tweaking is necessary, we can always do in another issue.

@mattgarrish mattgarrish merged commit 73431ec into main Mar 17, 2022
@mattgarrish mattgarrish deleted the feature/add-validators branch March 17, 2022 14:52
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.

5 participants