aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Török <[email protected]>2023-12-19 00:43:25 +0000
committerJohn MacFarlane <[email protected]>2023-12-18 17:15:03 -0800
commit95432d3f4e14688daba39ea1d65c8e4811f04ae7 (patch)
tree8999e1fb9df9660bf871dd0c06617d3bd1c3f4db
parentdbd1019a9706a6c91a7f83428f3cf0490f104cb4 (diff)
test(docx): add workaround for mc:Ignorable
`make validate-docx-golden-tests` now passes Fixes https://github.com/jgm/pandoc/issues/9269 Signed-off-by: Edwin Török <[email protected]>
-rw-r--r--Makefile3
-rw-r--r--wml.xsd.patch36
2 files changed, 38 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5d1be9ef8..2684d4284 100644
--- a/Makefile
+++ b/Makefile
@@ -238,7 +238,8 @@ update-website: ## update website and upload
validate-docx-golden-tests: ## validate docx golden tests against schema
which xmllint || ("xmllint is required" && exit 1)
test -d ./docx-validator || \
- git clone https://github.com/devoidfury/docx-validator
+ (git clone https://github.com/devoidfury/docx-validator && \
+ cd docx-validator && patch -p1 <../wml.xsd.patch)
sh ./tools/validate-docx.sh test/docx/golden/*.docx
.PHONY: validate-docx-golden-tests
diff --git a/wml.xsd.patch b/wml.xsd.patch
new file mode 100644
index 000000000..257cef083
--- /dev/null
+++ b/wml.xsd.patch
@@ -0,0 +1,36 @@
+diff --git a/schemas/ISO-IEC29500-4_2016/wml.xsd b/schemas/ISO-IEC29500-4_2016/wml.xsd
+index 6fa33d9..e243504 100644
+--- a/schemas/ISO-IEC29500-4_2016/wml.xsd
++++ b/schemas/ISO-IEC29500-4_2016/wml.xsd
+@@ -3044,6 +3044,7 @@
+ <xsd:element name="targetScreenSz" type="CT_TargetScreenSz" minOccurs="0"/>
+ <xsd:element name="saveSmartTagsAsXml" type="CT_OnOff" minOccurs="0"/>
+ </xsd:sequence>
++ <xsd:attribute ref="mc:Ignorable" use="optional" />
+ </xsd:complexType>
+ <xsd:simpleType name="ST_FrameScrollbar">
+ <xsd:restriction base="xsd:string">
+@@ -3194,6 +3195,7 @@
+ <xsd:element name="num" type="CT_Num" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="numIdMacAtCleanup" type="CT_DecimalNumber" minOccurs="0"/>
+ </xsd:sequence>
++ <xsd:attribute ref="mc:Ignorable" use="optional" />
+ </xsd:complexType>
+ <xsd:simpleType name="ST_TblStyleOverrideType">
+ <xsd:restriction base="xsd:string">
+@@ -3285,6 +3287,7 @@
+ <xsd:element name="latentStyles" type="CT_LatentStyles" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="style" type="CT_Style" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
++ <xsd:attribute ref="mc:Ignorable" use="optional" />
+ </xsd:complexType>
+ <xsd:complexType name="CT_Panose">
+ <xsd:attribute name="val" type="s:ST_Panose" use="required"/>
+@@ -3348,6 +3351,7 @@
+ <xsd:sequence>
+ <xsd:element name="font" type="CT_Font" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
++ <xsd:attribute ref="mc:Ignorable" use="optional" />
+ </xsd:complexType>
+ <xsd:complexType name="CT_DivBdr">
+ <xsd:sequence>