aboutsummaryrefslogtreecommitdiff
path: root/tools/validate-docx2.sh
AgeCommit message (Collapse)Author
2025-05-11Use jq instead of json_reformat in validate-docx-golden-tests2.John MacFarlane
2024-02-05fix(ci): explicitly choose a .Net versionEdwin Török
Upstream OOXML-Validator has added support for building with .Net 8.0 in commit 29af1086b5c78b6a213e70d2e1cb8da2a8e5b876. But that means OOXML-Validator can now be built for both .Net 6.0 and 8.0, so we need to pick which one we want when running, otherwise we get an error: ``` Unable to run your project Your project targets multiple frameworks. Specify which framework to run using '--framework'. ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-19ci(validate-docx-golden-tests2): fail on errorsEdwin Török
The validator just prints errors, but always exited with nonzero. Signed-off-by: Edwin Török <[email protected]>
2023-12-18fix(docx): fix OOXMLValidator error on KeywordTok outputEdwin Török
xmllint doesn't warn about this (maybe because the tag is empty?), but the order doesn't match wml.xsd: ``` <w:rPr> <w:color w:val="007020"/> <w:b/> </w:rPr> ``` And OOXMLValidatorCLI does warn about it: ``` { "Description": "The element has unexpected child element 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:b'.", "Path": { "NamespacesDefinitions": [ "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"" ], "Namespaces": { }, "XPath": "/w:styles[1]/w:style[40]/w:rPr[1]", "PartUri": "/word/styles.xml" }, "Id": "Sch_UnexpectedElementContentExpectingComplex", "ErrorType": "Schema" } ``` Signed-off-by: Edwin Török <[email protected]>
2023-12-18test(Makefile): add validate-docx-golden-test2Edwin Török
Add a validation rule based on OOXML-Validator which uses the Open-XML-SDK shipped and maintained as part of dotnet. This catches a few more issues compared to the .xsd. Unfortunately currently this executable always exits with 0 even when validation failed. That can be fixed later by invoking it from a script. Signed-off-by: Edwin Török <[email protected]>