You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

markup-compatibility.xsd 3.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. ====================================================================
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. ====================================================================
  17. -->
  18. <xsd:schema
  19. attributeFormDefault="unqualified" elementFormDefault="qualified"
  20. targetNamespace="http://schemas.openxmlformats.org/markup-compatibility/2006"
  21. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  22. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  23. >
  24. <!-- based on https://github.com/plutext/docx4j/blob/master/xsd/mce/markup-compatibility-2006-MINIMAL.xsd -->
  25. <!-- This XSD has 2 objectives:
  26. 1. round tripping @mc:Ignorable <w:document
  27. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  28. xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
  29. mc:Ignorable="w14 w15 wp14">
  30. 2. enabling AlternateContent to be manipulated
  31. in certain elements (in the unusual case where the content model is xsd:any,
  32. it doesn't have to be explicitly added) See further ECMA-376, 4th Edition,
  33. Office Open XML File Formats Part 3 : Markup Compatibility and Extensibility
  34. -->
  35. <!-- Objective 1 -->
  36. <xsd:attribute name="Ignorable" type="xsd:string" />
  37. <!-- Objective 2 -->
  38. <xsd:attribute name="MustUnderstand" type="xsd:string" />
  39. <xsd:attribute name="ProcessContent" type="xsd:string" />
  40. <!-- An AlternateContent element shall contain one or more Choice child
  41. elements, optionally followed by a Fallback child element. If present, there
  42. shall be only one Fallback element, and it shall follow all Choice elements. -->
  43. <xsd:element name="AlternateContent">
  44. <xsd:complexType>
  45. <xsd:sequence>
  46. <xsd:element name="Choice" minOccurs="0" maxOccurs="unbounded">
  47. <xsd:complexType>
  48. <xsd:sequence>
  49. <xsd:any minOccurs="0" maxOccurs="unbounded"
  50. processContents="strict">
  51. </xsd:any>
  52. </xsd:sequence>
  53. <xsd:attribute name="Requires" type="xsd:string"
  54. use="required" />
  55. <xsd:attribute ref="mc:Ignorable" use="optional" />
  56. <xsd:attribute ref="mc:MustUnderstand" use="optional" />
  57. <xsd:attribute ref="mc:ProcessContent" use="optional" />
  58. </xsd:complexType>
  59. </xsd:element>
  60. <xsd:element name="Fallback" minOccurs="0" maxOccurs="1">
  61. <xsd:complexType>
  62. <xsd:sequence>
  63. <xsd:any minOccurs="0" maxOccurs="unbounded"
  64. processContents="strict">
  65. </xsd:any>
  66. </xsd:sequence>
  67. <xsd:attribute ref="mc:Ignorable" use="optional" />
  68. <xsd:attribute ref="mc:MustUnderstand" use="optional" />
  69. <xsd:attribute ref="mc:ProcessContent" use="optional" />
  70. </xsd:complexType>
  71. </xsd:element>
  72. </xsd:sequence>
  73. <!-- AlternateContent elements might include the attributes Ignorable,
  74. MustUnderstand and ProcessContent described in this Part of ECMA-376. These
  75. attributes’ qualified names shall be prefixed when associated with an AlternateContent
  76. element. -->
  77. <xsd:attribute ref="mc:Ignorable" use="optional" />
  78. <xsd:attribute ref="mc:MustUnderstand" use="optional" />
  79. <xsd:attribute ref="mc:ProcessContent" use="optional" />
  80. </xsd:complexType>
  81. </xsd:element>
  82. </xsd:schema>