scxml-data-strict.xsd 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="http://www.w3.org/2005/07/scxml"
  4. xmlns="http://www.w3.org/2005/07/scxml"
  5. elementFormDefault="qualified">
  6. <xsd:annotation>
  7. <xsd:documentation>
  8. This is the XML Schema data module for SCXML
  9. * datamodel
  10. * data
  11. * assign
  12. * param
  13. * script
  14. * content
  15. The data module defines these elements and their
  16. attributes.
  17. </xsd:documentation>
  18. <xsd:documentation source="scxml-copyright.xsd"/>
  19. </xsd:annotation>
  20. <xsd:include schemaLocation="scxml-datatypes.xsd">
  21. <xsd:annotation>
  22. <xsd:documentation>
  23. This module defines SCXML Attribute DataTypes
  24. </xsd:documentation>
  25. </xsd:annotation>
  26. </xsd:include>
  27. <xsd:include schemaLocation="scxml-attribs.xsd">
  28. <xsd:annotation>
  29. <xsd:documentation>
  30. This module defines Common attributes for SCXML
  31. </xsd:documentation>
  32. </xsd:annotation>
  33. </xsd:include>
  34. <xsd:include schemaLocation="scxml-contentmodels.xsd">
  35. <xsd:annotation>
  36. <xsd:documentation>
  37. This module defines Common content model extensions for SCXML
  38. </xsd:documentation>
  39. </xsd:annotation>
  40. </xsd:include>
  41. <!-- datamodel -->
  42. <xsd:attributeGroup name="scxml.datamodel.attlist">
  43. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  44. </xsd:attributeGroup>
  45. <xsd:group name="scxml.datamodel.content">
  46. <xsd:sequence>
  47. <xsd:element ref="data" minOccurs="0" maxOccurs="unbounded"/>
  48. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  49. </xsd:sequence>
  50. </xsd:group>
  51. <xsd:complexType name="scxml.datamodel.type">
  52. <xsd:group ref="scxml.datamodel.content"/>
  53. <xsd:attributeGroup ref="scxml.datamodel.attlist"/>
  54. </xsd:complexType>
  55. <xsd:element name="datamodel" type="scxml.datamodel.type"/>
  56. <!-- data -->
  57. <xsd:attributeGroup name="scxml.data.attlist">
  58. <xsd:attribute name="id" type="xsd:ID" use="required"/>
  59. <xsd:attribute name="src" type="URI.datatype"/>
  60. <xsd:attribute name="expr" type="ValueLang.datatype"/>
  61. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  62. </xsd:attributeGroup>
  63. <xsd:group name="scxml.data.content">
  64. <xsd:sequence>
  65. <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  66. </xsd:sequence>
  67. </xsd:group>
  68. <xsd:complexType name="scxml.data.type" mixed="true">
  69. <xsd:group ref="scxml.data.content"/>
  70. <xsd:attributeGroup ref="scxml.data.attlist"/>
  71. <xsd:assert test="not(@src and @expr)" xpathDefaultNamespace="##targetNamespace"/>
  72. <xsd:assert test="if(@src or @expr) then (not(text() | *)) else true()" xpathDefaultNamespace="##targetNamespace"/>
  73. </xsd:complexType>
  74. <xsd:element name="data" type="scxml.data.type"/>
  75. <!-- param -->
  76. <xsd:attributeGroup name="scxml.param.attlist">
  77. <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
  78. <xsd:attribute name="expr" type="ValueLang.datatype"/>
  79. <xsd:attribute name="location" type="LocLang.datatype"/>
  80. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  81. </xsd:attributeGroup>
  82. <xsd:group name="scxml.param.content">
  83. <xsd:sequence>
  84. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  85. </xsd:sequence>
  86. </xsd:group>
  87. <xsd:complexType name="scxml.param.type">
  88. <xsd:group ref="scxml.param.content"/>
  89. <xsd:attributeGroup ref="scxml.param.attlist"/>
  90. <xsd:assert test="(@expr or @location) and not(@expr and @location)" xpathDefaultNamespace="##targetNamespace"/>
  91. </xsd:complexType>
  92. <xsd:element name="param" type="scxml.param.type"/>
  93. <!-- assign -->
  94. <xsd:attributeGroup name="scxml.assign.attlist">
  95. <xsd:attribute name="location" type="LocLang.datatype" use="required"/>
  96. <xsd:attribute name="expr" type="ValueLang.datatype"/>
  97. <xsd:attribute name="type" type="AssignType.datatype" default="replacechildren"/>
  98. <xsd:attribute name="attr" type="xsd:NMTOKEN"/>
  99. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  100. </xsd:attributeGroup>
  101. <xsd:group name="scxml.assign.content">
  102. <xsd:sequence>
  103. <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  104. </xsd:sequence>
  105. </xsd:group>
  106. <xsd:complexType name="scxml.assign.type" mixed="true">
  107. <xsd:group ref="scxml.assign.content"/>
  108. <xsd:attributeGroup ref="scxml.assign.attlist"/>
  109. <xsd:assert test="(@expr or text() or *)" xpathDefaultNamespace="##targetNamespace"/>
  110. <xsd:assert test="not(@expr and (text() | *))" xpathDefaultNamespace="##targetNamespace"/>
  111. </xsd:complexType>
  112. <xsd:element name="assign" type="scxml.assign.type"/>
  113. <!-- script -->
  114. <xsd:attributeGroup name="scxml.script.attlist">
  115. <xsd:attribute name="src" type="URI.datatype"/>
  116. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  117. </xsd:attributeGroup>
  118. <xsd:group name="scxml.script.content">
  119. <xsd:sequence>
  120. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  121. </xsd:sequence>
  122. </xsd:group>
  123. <xsd:complexType name="scxml.script.type" mixed="true">
  124. <xsd:group ref="scxml.script.content"/>
  125. <xsd:attributeGroup ref="scxml.script.attlist"/>
  126. </xsd:complexType>
  127. <xsd:element name="script" type="scxml.script.type"/>
  128. <!-- content -->
  129. <xsd:attributeGroup name="scxml.content.attlist">
  130. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  131. <xsd:attribute name="expr" type="ValueLang.datatype"/>
  132. </xsd:attributeGroup>
  133. <xsd:group name="scxml.content.content">
  134. <xsd:sequence>
  135. <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
  136. </xsd:sequence>
  137. </xsd:group>
  138. <xsd:complexType name="scxml.content.type" mixed="true">
  139. <xsd:group ref="scxml.content.content"/>
  140. <xsd:attributeGroup ref="scxml.content.attlist"/>
  141. <xsd:assert test="not(@expr and (text() or *))" xpathDefaultNamespace="##targetNamespace"/>
  142. </xsd:complexType>
  143. <xsd:element name="content" type="scxml.content.type"/>
  144. </xsd:schema>