test(xlsx): validate the package itself — content types, rels, core props - #556
Merged
Conversation
…rops The last unchecked parts, and the ones whose failure is worst: a malformed `.rels` breaks the whole workbook rather than one sheet. All valid, across every relationship file in every document. 133 parts across eleven documents now. Their schemas are in ECMA-376 Part 2, which is a third download and — for `opc-coreProperties.xsd` — needs an edit before it will load at all. It imports the Dublin Core schemas over plain HTTP, dublincore.org answers with a 302 that Java does not follow, and the parser reads the string "302 Found" as schema content and gives up. The header carries the four commands that fetch them and make the imports relative. `--opc` is optional; without it the script behaves as before. Checked for teeth on this path specifically, since it is a new schema: renaming `<Default>` to `<Bogus>` in the content-types writer turns `[Content_Types].xml` red with the schema naming exactly what it expected. Only VML is left unchecked, and the reason stays recorded where the mapping is: `vml-main.xsd` does not load in `javax.xml.validation` at all. pnpm test green — 10,571 tests, 232 files.
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.
The last unchecked parts, and the ones whose failure is worst: a malformed
.relsbreaks the whole workbook, not one sheet.All valid, across every relationship file in every document. 133 parts across eleven documents now.
[Content_Types].xmlopc-contentTypes.xsd*.relsopc-relationships.xsddocProps/core.xmlopc-coreProperties.xsdThe setup cost, recorded so nobody repeats it
These schemas are in ECMA-376 Part 2 — a third download — and
opc-coreProperties.xsdneeds an edit before it will load at all.It imports the Dublin Core schemas over plain HTTP; dublincore.org answers with a 302 that Java does not follow, so the parser reads the string
302 Foundas schema content and gives up:The header carries the four commands that fetch them and rewrite the imports as relative paths.
--opcis optional; without it the script behaves exactly as before.Teeth
Checked on this path specifically, since it is a new schema: renaming
<Default>to<Bogus>in the content-types writer turns[Content_Types].xmlred, with the schema naming exactly what it expected instead.Only VML is left unchecked, and the reason stays recorded beside the mapping —
vml-main.xsddoes not load injavax.xml.validationat all.pnpm testgreen — 10,571 tests, 232 files.🤖 Generated with Claude Code