mc.xsd 3.1 KB

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