daisy / pipeline-modules

Modules for the DAISY Pipeline project
3 stars 4 forks source link

DAISY2.02 Validator : master.smil invalid when having non-0 ncc:timeInThisSmil meta ? #101

Open NPavie opened 2 months ago

NPavie commented 2 months ago

With the pipeline app 1.5.0 - beta2 / engine 1.14.19 on Windows 11

I think I noticed an error with the DAISY2.02 validator of the pipeline 2 reporting an invalid duration in master.smil : The validator seems to always expect the ncc:timeInThisSmil meta to be 0 if declared, instead of the sum of the duration of the other smil referenced in the master smil body.

I looked at the recommendation here https://www.daisy.org/z3986/specifications/daisy_202.html#mastersmil and given that the master.smil should only use ref to other smil, I assume the time indicated in it should be the sum of the referenced smil durations but I can have misinterpreted it

bertfrees commented 1 month ago

@NPavie Have you checked what Pipeline 1 (scripts/verify/Daisy202DTBValidator.taskScript) does?

NPavie commented 1 month ago

@bert the code is a bit hard to untangled, but I traced back the validation code from the taskscript up to the src\org\daisy\util\fileset\validation\ValidatorImplD202.java class in the pipeline 1 repo.

So far I did not see any time-related validation logic applied to the master.smil file : The timings check is only done on the smil files that referenced by the ncc.html manifest. (which is not the case for the master smil document)

In the ValidatorImplD202 class, some validation logic seemed planned but not completed as there is an empty validation function for it with only a TODO comment in it.

bertfrees commented 1 month ago

There is also this old project. It's written in CLS (common language specification). There seems to be some time-related logic in daisytools/trunk/validator/src/dll/oMasterSmilRel.cls.