From b0c67177ffbaf0faa7361dea4e49a90ed055b23f Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 16 Aug 2024 12:06:41 +0000 Subject: [PATCH] [github-673] Add word10.xsd to poi-ooxml-full. Thanks to fangd1997. This closes #673 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919929 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 2 +- poi-ooxml-full/build.gradle | 2 +- .../org/apache/poi/schemas/word10.xsd | 562 ++++++++++++++++++ .../apache/poi/ooxml/POIXMLTypeLoader.java | 2 + 4 files changed, 566 insertions(+), 2 deletions(-) create mode 100644 poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/word10.xsd diff --git a/build.xml b/build.xml index 78c3f7b685..1312b9c73a 100644 --- a/build.xml +++ b/build.xml @@ -933,7 +933,7 @@ under the License. - + diff --git a/poi-ooxml-full/build.gradle b/poi-ooxml-full/build.gradle index d5f83c78cb..502dc0c8fe 100644 --- a/poi-ooxml-full/build.gradle +++ b/poi-ooxml-full/build.gradle @@ -75,7 +75,7 @@ task copy_xsds(type: Copy) { from ('src/main/xmlschema/org/apache/poi/xdgf') from ('src/main/xmlschema/org/apache/poi/schemas') { include 'XAdES*.xsd', '*.xsdconfig', 'xmldsig*.xsd', 'ooxmlSchemas.xsdconfig', 'markup-compatibility.xsd', - 'vmlDrawing.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd', + 'vmlDrawing.xsd', 'word10.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd', 'chartEx.xsd' exclude '*.zip' } diff --git a/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/word10.xsd b/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/word10.xsd new file mode 100644 index 0000000000..4ced5b5a97 --- /dev/null +++ b/poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/word10.xsd @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java index 6e070b1252..e848e383cd 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java @@ -68,6 +68,8 @@ public class POIXMLTypeLoader { map.put(MS_EXCEL_URN, "x"); map.put(MS_WORD_URN, "w10"); map.put(MS_VML_URN, "v"); + map.put("http://schemas.microsoft.com/office/word/2010/wordml", "w14"); + map.put("http://schemas.microsoft.com/office/word/2012/wordml", "w15"); map.put("http://schemas.microsoft.com/office/drawing/2012/chart", "c15"); DEFAULT_XML_OPTIONS.setSaveSuggestedPrefixes(Collections.unmodifiableMap(map)); }