main
1<?xml version="1.0" encoding="utf-8"?>
2<xsd:schema xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
3 attributeFormDefault="unqualified" elementFormDefault="qualified"
4 targetNamespace="http://schemas.openxmlformats.org/markup-compatibility/2006"
5 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
6
7 <!--
8 This XSD is a modified version of the one found at:
9 https://github.com/plutext/docx4j/blob/master/xsd/mce/markup-compatibility-2006-MINIMAL.xsd
10
11 This XSD has 2 objectives:
12
13 1. round tripping @mc:Ignorable
14
15 <w:document
16 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
17 xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
18 mc:Ignorable="w14 w15 wp14">
19
20 2. enabling AlternateContent to be manipulated in certain elements
21 (in the unusual case where the content model is xsd:any, it doesn't have to be explicitly added)
22
23 See further ECMA-376, 4th Edition, Office Open XML File Formats
24 Part 3 : Markup Compatibility and Extensibility
25 -->
26
27 <!-- Objective 1 -->
28 <xsd:attribute name="Ignorable" type="xsd:string" />
29
30 <!-- Objective 2 -->
31 <xsd:attribute name="MustUnderstand" type="xsd:string" />
32 <xsd:attribute name="ProcessContent" type="xsd:string" />
33
34<!-- An AlternateContent element shall contain one or more Choice child elements, optionally followed by a
35Fallback child element. If present, there shall be only one Fallback element, and it shall follow all Choice
36elements. -->
37 <xsd:element name="AlternateContent">
38 <xsd:complexType>
39 <xsd:sequence>
40 <xsd:element name="Choice" minOccurs="0" maxOccurs="unbounded">
41 <xsd:complexType>
42 <xsd:sequence>
43 <xsd:any minOccurs="0" maxOccurs="unbounded"
44 processContents="strict">
45 </xsd:any>
46 </xsd:sequence>
47 <xsd:attribute name="Requires" type="xsd:string" use="required" />
48 <xsd:attribute ref="mc:Ignorable" use="optional" />
49 <xsd:attribute ref="mc:MustUnderstand" use="optional" />
50 <xsd:attribute ref="mc:ProcessContent" use="optional" />
51 </xsd:complexType>
52 </xsd:element>
53 <xsd:element name="Fallback" minOccurs="0" maxOccurs="1">
54 <xsd:complexType>
55 <xsd:sequence>
56 <xsd:any minOccurs="0" maxOccurs="unbounded"
57 processContents="strict">
58 </xsd:any>
59 </xsd:sequence>
60 <xsd:attribute ref="mc:Ignorable" use="optional" />
61 <xsd:attribute ref="mc:MustUnderstand" use="optional" />
62 <xsd:attribute ref="mc:ProcessContent" use="optional" />
63 </xsd:complexType>
64 </xsd:element>
65 </xsd:sequence>
66 <!-- AlternateContent elements might include the attributes Ignorable,
67 MustUnderstand and ProcessContent described in this Part of ECMA-376. These
68 attributes’ qualified names shall be prefixed when associated with an AlternateContent
69 element. -->
70 <xsd:attribute ref="mc:Ignorable" use="optional" />
71 <xsd:attribute ref="mc:MustUnderstand" use="optional" />
72 <xsd:attribute ref="mc:ProcessContent" use="optional" />
73 </xsd:complexType>
74 </xsd:element>
75</xsd:schema>