Skip to content
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

Major code cleanup, improved validation reporting, and NIMAS support #58

Merged
merged 23 commits into from
Jun 19, 2023

Conversation

bertfrees
Copy link
Member

@bertfrees bertfrees commented Jun 19, 2023

While working on NIMAS support I stumbled on a lot of side issues, which led to a big code cleanup and various improvements to validation related steps. See the individual commit messages for more details.

There are actually only very few changes I did for NIMAS. After all, NIMAS is almost identical to DTBook. The main difference is that the meta element must be empty in NIMAS. For this reason, when the input is NIMAS (which you can indicate with a new option for the dtbook-to-zedai, dtbook-to-html and dtbook-to-epub3 scripts), no MODS file is generated in the px:dtbook-to-zedai step because it would otherwise be empty and therefore invalid.

I also fixed one thing in the NIMAS schema that Nicole said was wrong.

I found various issues in px:dtbook-to-zedai that can result in an invalid ZedAI output (for a valid DTBook input). These issues are not related to NIMAS, and are not addressed yet. For now I disabled the validation of the intermediary ZedAI in px:dtbook-to-html and px:dtbook-to-epub3, because the validation issues in the ZedAI do not necessarily result in bad HTML so the user should not be bothered with it.

The reported issues in dtbook-to-rtf and dtbook-to-odt were not addressed yet. It is quite likely that these are not related to NIMAS either.

… dc-metadata

rather than a <meta name="DCTERMS.created"> element in x-metadata.
- rename output ports
- change option types
Also change validation option of px:epub-load to xs:boolean
The remaining script that had the option were:

- dtbook-to-html
- dtbook-to-epub3
- daisy3-to-epub3

fixes daisy/pipeline-scripts#111
Make it possible to specify a code with a prefix without having to
specify code-namespace when the prefix is bound to a namespace.
…k-to-zedai

The input was already validated but only partly (only RelaxNG) and
only after a px:dtbook-upgrade step. There is also a
"validation-report" output now.
The code option to specify the error code was removed. The step now
throws the errors on the "report" port if the "method" option is set
to "error".

px:error and px:log-error now accept a sequence of documents on the
"error" port. For convenience, px:error now also has a "source" port.
- port: issues are reported only on the xml-report and html-report
  output ports
- log: in addition to the xml-report and html-report output ports, issues are also
  reported through warning messages
- error: issues are reported through error messages and also trigger
  an XProc error
Also fixed px:fileset-load: the step should fail if the
"fail-on-not-found" option is set and a file with @method='xml' can
not be loaded as XML.
to bypass Schematron validation.
- dtbook-to-zedai
- dtbook-to-epub3
- dtbook-to-html
- px:dtbook-load
- px:dtbook-validate
…epub3

When the input is NIMAS, don't generate a MODS file (in
px:dtbook-to-zedai) because it would be empty (and therefore invalid).
…-to-epub3

for now, because px:dtbook-to-zedai is not perfect, but the issues in
the ZedAI do not necessarily result in bad HTML. The real solution is
to fix px:dtbook-to-zedai.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant