Commit Graph
3 Commits
Author SHA1 Message Date
aiongg 54cf473c52 perf(tools): validate many IDML packages per Jing run
validate.sh takes several packages and validates their parts with one JVM per schema and batch of 400 parts, in parallel. compare.py validates its outputs 600 at a time instead of one validate.sh run per file. The full corpus validates in about 4.5 minutes instead of 45.
2026-10-07 08:19:57 +00:00
aiongg a9985b3775 fix: validate every corpus output and fix the two schema failures
compare.py --all now also converts the INDD and INDT files that have no
same-version IDML (any version, either byte order), validates them and
counts converter warnings by kind. validate.sh runs Jing once per schema
instead of once per file, which makes validating the whole corpus take
about 3 minutes.

Two schema failures showed up in files without an IDML:

- Gradient swatch midpoints are stored as positions from the start of
  the gradient. IDML wants them relative to the gap between two stops,
  as for opacity gradient stops. Values outside 13-87 are left out with
  a warning.
- The style kind is a u16, not a u32. One InDesign 7.5 template has a
  non-zero u16 after it, which made 151 character styles paragraph
  styles.
2026-10-07 03:50:08 +00:00
aiongg 602065453e feat: validate output against the IDML schemas
Add tools/validate.sh, which checks every XML part of an IDML package
against InDesign's generated RelaxNG schemas with Jing, and a --schemas
option in compare.py. Output for all 75 corpus pairs validates.

Do not write BindingLocation on master spreads, which the schema does not
allow.
2026-10-06 17:11:34 +00:00