25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

134 lines
4.9 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  9. <xs:element name="config">
  10. <xs:complexType>
  11. <xs:sequence>
  12. <xs:element name="view" type="viewType" minOccurs="1" maxOccurs="unbounded" />
  13. </xs:sequence>
  14. </xs:complexType>
  15. <xs:unique name="uniqueViewId">
  16. <xs:annotation>
  17. <xs:documentation>
  18. View Id must be unique.
  19. </xs:documentation>
  20. </xs:annotation>
  21. <xs:selector xpath="view" />
  22. <xs:field xpath="@id" />
  23. </xs:unique>
  24. </xs:element>
  25. <xs:complexType name="viewType">
  26. <xs:annotation>
  27. <xs:documentation>
  28. View declaration.
  29. </xs:documentation>
  30. </xs:annotation>
  31. <xs:sequence>
  32. <xs:element minOccurs="0" name="subscriptions" type="subscriptionsType">
  33. <xs:unique name="uniqueSubscriptionsTable">
  34. <xs:annotation>
  35. <xs:documentation>
  36. Table must be unique.
  37. </xs:documentation>
  38. </xs:annotation>
  39. <xs:selector xpath=".//table" />
  40. <xs:field xpath="@name" />
  41. <xs:field xpath="@entity_column" />
  42. </xs:unique>
  43. </xs:element>
  44. </xs:sequence>
  45. <xs:attribute name="id" type="xs:string" use="required" />
  46. <xs:attribute name="class" type="classType" use="required" />
  47. <xs:attribute name="group" type="xs:string" use="required" />
  48. <xs:attribute name="walker" type="classType" default="Magento\Framework\Mview\View\ChangeLogBatchWalker" />
  49. </xs:complexType>
  50. <xs:simpleType name="classType">
  51. <xs:annotation>
  52. <xs:documentation>
  53. Class name can contain only [a-zA-Z|\\]+[a-zA-Z0-9\\]+.
  54. </xs:documentation>
  55. </xs:annotation>
  56. <xs:restriction base="xs:string">
  57. <xs:pattern value="[a-zA-Z|\\]+[a-zA-Z0-9\\]+" />
  58. </xs:restriction>
  59. </xs:simpleType>
  60. <xs:complexType name="subscriptionsType">
  61. <xs:annotation>
  62. <xs:documentation>
  63. Subscriptions declaration.
  64. </xs:documentation>
  65. </xs:annotation>
  66. <xs:sequence>
  67. <xs:element name="table" type="subscriptionsTableType" minOccurs="1" maxOccurs="unbounded" />
  68. </xs:sequence>
  69. </xs:complexType>
  70. <xs:complexType name="subscriptionsTableType">
  71. <xs:annotation>
  72. <xs:documentation>
  73. Table declaration.
  74. </xs:documentation>
  75. </xs:annotation>
  76. <xs:sequence>
  77. <xs:element minOccurs="0" name="additionalColumns" type="additionalColumnsType" />
  78. </xs:sequence>
  79. <xs:attribute name="name" type="tableNameType" use="required" />
  80. <xs:attribute name="entity_column" type="entityColumnType" use="required" />
  81. <xs:attribute name="subscription_model" type="subscriptionModelType" />
  82. <xs:attribute name="processor" type="classType" default="Magento\Framework\Mview\View\AdditionalColumnsProcessor\DefaultProcessor" />
  83. </xs:complexType>
  84. <xs:complexType name="additionalColumnsType">
  85. <xs:sequence>
  86. <xs:element minOccurs="1" maxOccurs="unbounded" name="column" type="additionalColumnAttributeType" />
  87. </xs:sequence>
  88. </xs:complexType>
  89. <xs:complexType name="additionalColumnAttributeType">
  90. <xs:attribute name="name" type="xs:string" />
  91. <xs:attribute name="cl_name" type="xs:string" />
  92. <xs:attribute name="constant" type="xs:string" />
  93. </xs:complexType>
  94. <xs:simpleType name="entityColumnType">
  95. <xs:annotation>
  96. <xs:documentation>
  97. Entity column can contain only [a-z_].
  98. </xs:documentation>
  99. </xs:annotation>
  100. <xs:restriction base="xs:string">
  101. <xs:pattern value="[a-z_]+" />
  102. </xs:restriction>
  103. </xs:simpleType>
  104. <xs:simpleType name="tableNameType">
  105. <xs:annotation>
  106. <xs:documentation>
  107. Table name can contain only [a-z_].
  108. </xs:documentation>
  109. </xs:annotation>
  110. <xs:restriction base="xs:string">
  111. <xs:pattern value="[a-z_]+" />
  112. </xs:restriction>
  113. </xs:simpleType>
  114. <xs:simpleType name="subscriptionModelType">
  115. <xs:annotation>
  116. <xs:documentation>
  117. DEPRECATED. Subscription model must be a valid PHP class or interface name.
  118. </xs:documentation>
  119. </xs:annotation>
  120. <xs:restriction base="xs:string">
  121. <xs:pattern value="[a-zA-Z_][a-zA-Z0-9\\]*" />
  122. </xs:restriction>
  123. </xs:simpleType>
  124. </xs:schema>