doctrine-extensions-mapping.xsd 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
  4. xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
  5. elementFormDefault="qualified">
  6. <xs:annotation>
  7. <xs:documentation><![CDATA[
  8. This is the XML Schema for the object/relational
  9. mapping file used by the Doctrine Extensions by Gedmo
  10. extensions
  11. Doctrine component version support: 2.2.x
  12. ]]></xs:documentation>
  13. </xs:annotation>
  14. <!--
  15. It would be nice if we could force the gedmo with only necessary elements into each of doctrine elements.
  16. Patches that do that are more than welcome.
  17. Please note, that marking e.g filed element in xml document with xsi:type is not an option as we need to allow other
  18. people to push their own additional attributes/elements into the same field element and they should not extend our schema
  19. -->
  20. <!-- entity -->
  21. <xs:element name="translation" type="gedmo:translation"/>
  22. <xs:element name="tree" type="gedmo:tree"/>
  23. <xs:element name="tree-closure" type="gedmo:tree-closure"/>
  24. <xs:element name="loggable" type="gedmo:loggable"/>
  25. <xs:element name="soft-deleteable" type="gedmo:soft-deleteable"/>
  26. <xs:element name="uploadable" type="gedmo:uploadable"/>
  27. <!-- field -->
  28. <xs:element name="slug" type="gedmo:slug"/>
  29. <xs:element name="translatable" type="gedmo:translatable"/>
  30. <xs:element name="timestampable" type="gedmo:timestampable"/>
  31. <xs:element name="versioned" type="gedmo:emptyType"/>
  32. <xs:element name="tree-left" type="gedmo:emptyType"/>
  33. <xs:element name="tree-right" type="gedmo:emptyType"/>
  34. <xs:element name="tree-level" type="gedmo:emptyType"/>
  35. <xs:element name="tree-root" type="gedmo:emptyType"/>
  36. <xs:element name="tree-parent" type="gedmo:emptyType"/>
  37. <xs:element name="tree-path-source" type="gedmo:emptyType"/>
  38. <xs:element name="tree-lock-time" type="gedmo:emptyType"/>
  39. <xs:element name="sortable-group" type="gedmo:emptyType"/>
  40. <xs:element name="sortable-position" type="gedmo:emptyType"/>
  41. <xs:element name="uploadable-file-mime-type" type="gedmo:emptyType"/>
  42. <xs:element name="uploadable-file-path" type="gedmo:emptyType"/>
  43. <xs:element name="uploadable-file-size" type="gedmo:emptyType"/>
  44. <xs:complexType name="translation">
  45. <xs:attribute name="entity" type="xs:string" use="optional" />
  46. <xs:attribute name="locale" type="xs:string" use="optional" />
  47. <xs:attribute name="language" type="xs:string" use="optional" />
  48. </xs:complexType>
  49. <xs:complexType name="tree">
  50. <xs:attribute name="type" type="gedmo:tree-type" default="nested" />
  51. <xs:attribute name="activate-locking" type="xs:boolean" default="false" />
  52. <xs:attribute name="locking-timeout" type="xs:integer" default="3" />
  53. </xs:complexType>
  54. <xs:complexType name="tree-closure">
  55. <xs:attribute name="class" type="xs:string" use="required" />
  56. </xs:complexType>
  57. <xs:complexType name="tree-path">
  58. <xs:attribute name="separator" type="xs:string" use="optional" default="|" />
  59. </xs:complexType>
  60. <xs:complexType name="loggable">
  61. <xs:attribute name="log-entry-class" type="xs:string" use="optional" />
  62. </xs:complexType>
  63. <xs:complexType name="slug">
  64. <xs:sequence>
  65. <xs:element name="handler" type="gedmo:handler" minOccurs="0" maxOccurs="unbounded"/>
  66. </xs:sequence>
  67. <xs:attribute name="fields" type="xs:string" use="required"/>
  68. <xs:attribute name="unique" type="xs:boolean" use="optional" />
  69. <xs:attribute name="updatable" type="xs:boolean" use="optional" />
  70. <xs:attribute name="separator" type="xs:string" use="optional" />
  71. <xs:attribute name="style" type="gedmo:slug-style" use="optional" />
  72. </xs:complexType>
  73. <xs:complexType name="soft-deleteable">
  74. <xs:attribute name="field-name" type="xs:string" use="required" />
  75. </xs:complexType>
  76. <xs:complexType name="handler">
  77. <xs:sequence>
  78. <xs:element name="handler-option" type="gedmo:handler-option" minOccurs="0" maxOccurs="unbounded"/>
  79. </xs:sequence>
  80. <xs:attribute name="class" type="xs:string" use="required"/>
  81. </xs:complexType>
  82. <xs:complexType name="handler-option">
  83. <xs:attribute name="name" type="xs:string" use="required"/>
  84. <xs:attribute name="value" type="xs:string" use="required"/>
  85. </xs:complexType>
  86. <xs:complexType name="timestampable">
  87. <xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
  88. <xs:attribute name="field" type="xs:string" use="optional" />
  89. <xs:attribute name="value" type="xs:string" use="optional" />
  90. </xs:complexType>
  91. <xs:complexType name="translatable">
  92. <xs:attribute name="fallback" type="xs:boolean" use="optional" />
  93. </xs:complexType>
  94. <xs:complexType name="emptyType">
  95. </xs:complexType>
  96. <xs:simpleType name="tree-type">
  97. <xs:restriction base="xs:token">
  98. <xs:enumeration value="nested"/>
  99. <xs:enumeration value="closure"/>
  100. <xs:enumeration value="materializedPath"/>
  101. </xs:restriction>
  102. </xs:simpleType>
  103. <xs:simpleType name="slug-style">
  104. <xs:restriction base="xs:token">
  105. <xs:enumeration value="default"/>
  106. <xs:enumeration value="camel"/>
  107. </xs:restriction>
  108. </xs:simpleType>
  109. <xs:simpleType name="timestampable-action">
  110. <xs:restriction base="xs:token">
  111. <xs:enumeration value="create"/>
  112. <xs:enumeration value="update"/>
  113. <xs:enumeration value="change"/>
  114. </xs:restriction>
  115. </xs:simpleType>
  116. <xs:complexType name="uploadable">
  117. <xs:attribute name="allow-overwrite" type="xs:boolean" use="optional" />
  118. <xs:attribute name="append-number" type="xs:boolean" use="optional" />
  119. <xs:attribute name="callback" type="xs:string" use="optional" />
  120. <xs:attribute name="path" type="xs:string" use="optional" />
  121. <xs:attribute name="path-method" type="xs:string" use="optional" />
  122. <xs:attribute name="filename-generator" type="xs:string" use="optional" />
  123. <xs:attribute name="max-size" type="xs:double" use="optional" default="0" />
  124. <xs:attribute name="allowed-types" type="xs:string" use="optional" />
  125. <xs:attribute name="disallowed-types" type="xs:string" use="optional" />
  126. </xs:complexType>
  127. </xs:schema>