Repository navigation
validate the rules of DCLX archives - #241
Merged
Merged
Conversation
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
vagenas
marked this pull request as ready for review
November 19, 2026 13:31
PeterStaar-IBM
approved these changes
Nov 19, 2026
This file contains hidden or 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
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.
Check the rules of Annex B on a
.dclxarchive's parts other thandocument.xml, and add rules on references from the markup.Spec (Annex B)
<src>URI MUST resolve to a part of the archive.<track>, or referenced by a relative URI in the markup.Validator
validate()anddoclang validateaccept.dclxand report archive errors separately (ValidationError.archive_errors, an "Archive" section in the CLI output and JSON):[Content_Types].xml: present, with the<Override>for/document.xmland a content type for every part._rels/.rels: present, with exactly one document relationship, targetingdocument.xml.pages/{N}beyond the page count,audio/{N}andvideo/{N}beyond the number of<track>s, and more than one file per track per modality.<src>URIs that resolve to no part.spec_versionif given, else the declared one, else the latest. Not checked with--xsd-onlyor--schematron-only.Packer
pack(validate=True)/doclang pack --validatevalidates the built archive, not only its document, and writes no output if that fails.Other
examples/archive-demo: declare thewavcontent type of itsaudio/1.wav.<src>URIs and counts<track>s with the same code as the validator.