RE: Actually running our schema against manifest files

> Do you think there’s any errors the JSON schemas would highlight that’s not covered by the algorithm?

 

The only thing they probably do more effectively than the algorithm is a basic check that the values of a given property match the expected type(s). With the algorithm, you have to walk over the known properties and if they’re arrays iterate each value, to determine whether it correctly contains a string, object or array.

 

Otherwise, I think all the schemas offer is a few basic verifications that are otherwise left to a developer to check as part of the implementing the algorithm (e.g., the schemas have some basic language tag validation, whereas the algorithm only says to raise a warning if a language is invalid). These tend to be weak checks, though, as the schemas are limited to only a few mechanisms, like regexes, for testing values.

 

The downside is the required values that are harvested from the html when not present. The schemas would have to be loosened to not report errors when the properties aren’t set or the messages would have to be suppressed.

 

So maybe there’s a way to leverage them with the algorithm checks, but it’ll take some fine-tuning to harmonize the two.

 

Matt

 

From: Marisa DeMeglio <marisa.demeglio@gmail.com> 
Sent: June 29, 2020 20:53
To: Matt Garrish <matt.garrish@gmail.com>
Cc: W3C Publishing Working Group <public-publ-wg@w3.org>
Subject: Re: Actually running our schema against manifest files

 

Yeah totally agree - this is not the same as a processing algorithm implementation. I’ve done that separately. 

 

Do you think there’s any errors the JSON schemas would highlight that’s not covered by the algorithm? I haven’t read them in depth.

 

Marisa





On Jun 29, 2020, at 16:48, Matt Garrish <matt.garrish@gmail.com <mailto:matt.garrish@gmail.com> > wrote:

 

Ya, the JSON schemas only provide basic validation, unfortunately, as its not the most robust language. I’ve really only found them useful for editing in a schema-aware program like oxygen, as they help with code completion. As Ivan mentioned, the only robust way to determine conformance is to actually transform a manifest using the algorithm in the spec., in part because data may need to be harvested from elsewhere.

 

Not that we shouldn’t keep them up to date, but I’m not sure where they’ll fit in in an eventual validator.

 

Matt

 

From: Marisa DeMeglio <marisa.demeglio@gmail.com <mailto:marisa.demeglio@gmail.com> > 
Sent: June 29, 2020 17:56
To: W3C Publishing Working Group <public-publ-wg@w3.org <mailto:public-publ-wg@w3.org> >
Subject: Actually running our schema against manifest files

 

Hello,

 

After the call today, I decided to try running our JSON-LD schema against some manifest samples. You can try it here:

 

https://marisademeglio.github.io/audiobooks-js/example/schema.html

 

So far I’ve found two things that I think are schema errors (filing issues shortly). Otherwise, nothing to report except this is definitely not a validator, just an experiment, but also, it’s an experiment that will report validation errors. It won’t, however, report validation success. 

 

Marisa

 

Received on Tuesday, 30 June 2020 10:40:07 UTC