XmlOcaf.xsd 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <schema targetNamespace="http://www.opencascade.org/OCAF/XML"
  2. xmlns="http://www.w3.org/2001/XMLSchema"
  3. xmlns:ocaf="http://www.opencascade.org/OCAF/XML"
  4. elementFormDefault="qualified">
  5. <include schemaLocation="XmlOcaf_SmallTypes.xsd"/>
  6. <include schemaLocation="XmlOcaf_TDataStd.xsd"/>
  7. <include schemaLocation="XmlOcaf_TDF.xsd"/>
  8. <include schemaLocation="XmlOcaf_TDocStd.xsd"/>
  9. <include schemaLocation="XmlOcaf_TFunction.xsd"/>
  10. <include schemaLocation="XmlOcaf_TNaming.xsd"/>
  11. <include schemaLocation="XmlOcaf_TPrsStd.xsd"/>
  12. <annotation>
  13. <documentation xml:lang="en">
  14. Copyright (c) 2001-2014 OPEN CASCADE SAS
  15. This file is part of Open CASCADE Technology software library.
  16. This library is free software; you can redistribute it and/or modify it under
  17. the terms of the GNU Lesser General Public License version 2.1 as published
  18. by the Free Software Foundation, with special exception defined in the file
  19. OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
  20. distribution for complete text of the license and disclaimer of any warranty.
  21. Alternatively, this file may be used under the terms of Open CASCADE
  22. commercial license or contractual agreement.
  23. Open Cascade Application Framework: Definition of XmlOcaf Persistence format.
  24. This Schema definition resides at: $(CASROOT)/src/XmlOcafResource/XmlOcaf.xsd
  25. </documentation>
  26. </annotation>
  27. <complexType name="LabelType">
  28. <sequence>
  29. <choice minOccurs="0" maxOccurs="unbounded">
  30. <element ref="ocaf:AbstractStringAtt"/>
  31. <element ref="ocaf:AbstractIntegerAtt"/>
  32. <element ref="ocaf:AbstractRealAtt"/>
  33. <element ref="ocaf:AbstractListIntegerAtt"/>
  34. <element ref="ocaf:AbstractListRealAtt"/>
  35. <element ref="ocaf:AbstractAttribute"/>
  36. <element ref="ocaf:AbstractXPathLabel"/>
  37. <element ref="ocaf:AbstractList3RealAtt"/>
  38. </choice>
  39. <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
  40. <!-- This type of uniqueness does not allow recursive structures
  41. <unique name="LabelUniqueness">
  42. <selector xpath="ocaf:label"/>
  43. <field xpath="@tag"/>
  44. </unique> -->
  45. </element>
  46. </sequence>
  47. <attribute name="tag" type="positiveInteger" use="required"/>
  48. </complexType>
  49. <!-- Declaration of document element +++++++++++++++++++++++++++ -->
  50. <element name="document">
  51. <complexType>
  52. <sequence>
  53. <!-- Declaration of element 'info' +++++++++++++++++++++++++++++ -->
  54. <element name="info">
  55. <complexType>
  56. <sequence>
  57. <element name="iitem" type="string" minOccurs="0" maxOccurs="unbounded"/>
  58. </sequence>
  59. <attribute name="date" type="date" use="required"/>
  60. <attribute name="schemav" type="nonNegativeInteger" use="required"/>
  61. <attribute name="DocVersion" type="nonNegativeInteger" use="required"/>
  62. <attribute name="objnb" type="nonNegativeInteger" use="required"/>
  63. </complexType>
  64. </element> <!-- END 'info' -->
  65. <!-- Declaration of element 'comments' ++++++++++++++++++++++++++ -->
  66. <element name="comments">
  67. <complexType>
  68. <sequence>
  69. <element name="citem" type="string" minOccurs="0" maxOccurs="unbounded"/>
  70. </sequence>
  71. </complexType>
  72. </element> <!-- END 'comments' -->
  73. <!-- Declaration of element 'label' +++++++++++++++++++++++++++++ -->
  74. <element name="label">
  75. <!-- Local type redefinition from ocaf:LabelType by restriction -->
  76. <complexType>
  77. <complexContent>
  78. <restriction base="ocaf:LabelType">
  79. <sequence>
  80. <choice minOccurs="0" maxOccurs="unbounded">
  81. <element ref="ocaf:AbstractStringAtt"/>
  82. <element ref="ocaf:AbstractIntegerAtt"/>
  83. <element ref="ocaf:AbstractRealAtt"/>
  84. <element ref="ocaf:AbstractListIntegerAtt"/>
  85. <element ref="ocaf:AbstractListRealAtt"/>
  86. <element ref="ocaf:AbstractAttribute"/>
  87. <element ref="ocaf:AbstractXPathLabel"/>
  88. <element ref="ocaf:AbstractList3RealAtt"/>
  89. </choice>
  90. <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
  91. <unique name="Label1Uniqueness">
  92. <selector xpath="ocaf:label"/>
  93. <field xpath="@tag"/> <!-- label tags -->
  94. </unique>
  95. </element>
  96. </sequence>
  97. <!-- Difference from ocaf:LabelType is FIXEDNESS of tag attribute -->
  98. <attribute name="tag" type="nonNegativeInteger" fixed="0"/>
  99. </restriction>
  100. </complexContent>
  101. </complexType>
  102. <!-- Uniqueness of tags in sub-labels -->
  103. <unique name="Label0Uniqueness">
  104. <selector xpath="ocaf:label"/>
  105. <field xpath="@tag"/>
  106. </unique>
  107. <!-- Uniqueness of 'id' values of shareable objects -->
  108. <unique name="ShareableIdUniqueness">
  109. <selector xpath=".//ocaf:*"/>
  110. <field xpath="@id"/>
  111. </unique>
  112. </element> <!-- END 'label 0' -->
  113. <!-- Declaration of element 'shapes' +++++++++++++++++++++++++++ -->
  114. <element name="shapes" type="string" minOccurs="0"/>
  115. </sequence>
  116. <attribute name="format" type="string" use="required"/>
  117. </complexType>
  118. </element> <!-- END 'document' -->
  119. </schema>