-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to be more in line with other scripts.
… 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.
This was referenced Jun 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thepx: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 inpx:dtbook-to-html
andpx: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.