scxml-external-strict.xsd 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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 external module for SCXML
  9. * send
  10. * cancel
  11. * invoke
  12. * finalize
  13. The external module defines these elements and their
  14. attributes.
  15. </xsd:documentation>
  16. <xsd:documentation source="scxml-copyright.xsd"/>
  17. </xsd:annotation>
  18. <xsd:include schemaLocation="scxml-datatypes.xsd">
  19. <xsd:annotation>
  20. <xsd:documentation>
  21. This module defines SCXML Attribute DataTypes
  22. </xsd:documentation>
  23. </xsd:annotation>
  24. </xsd:include>
  25. <xsd:include schemaLocation="scxml-attribs.xsd">
  26. <xsd:annotation>
  27. <xsd:documentation>
  28. This module defines Common attributes for SCXML
  29. </xsd:documentation>
  30. </xsd:annotation>
  31. </xsd:include>
  32. <xsd:include schemaLocation="scxml-contentmodels.xsd">
  33. <xsd:annotation>
  34. <xsd:documentation>
  35. This module defines Common content model extensions for SCXML
  36. </xsd:documentation>
  37. </xsd:annotation>
  38. </xsd:include>
  39. <!-- send -->
  40. <xsd:attributeGroup name="scxml.send.attlist">
  41. <xsd:attribute name="event" type="EventType.datatype"/>
  42. <xsd:attribute name="eventexpr" type="ValueLang.datatype"/>
  43. <xsd:attribute name="target" type="URI.datatype"/>
  44. <xsd:attribute name="targetexpr" type="ValueLang.datatype"/>
  45. <xsd:attribute name="type" type="xsd:string" default="scxml"/>
  46. <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
  47. <xsd:attribute name="id" type="xsd:ID"/>
  48. <xsd:attribute name="idlocation" type="LocLang.datatype"/>
  49. <xsd:attribute name="delay" type="Duration.datatype" default="0s"/>
  50. <xsd:attribute name="delayexpr" type="ValueLang.datatype"/>
  51. <xsd:attribute name="namelist" type="xsd:string"/>
  52. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  53. </xsd:attributeGroup>
  54. <xsd:group name="scxml.send.mix">
  55. <xsd:choice>
  56. <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
  57. <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
  58. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  59. </xsd:choice>
  60. </xsd:group>
  61. <xsd:group name="scxml.send.content">
  62. <xsd:sequence>
  63. <xsd:group ref="scxml.send.mix" minOccurs="0" maxOccurs="unbounded"/>
  64. </xsd:sequence>
  65. </xsd:group>
  66. <xsd:complexType name="scxml.send.type">
  67. <xsd:group ref="scxml.send.content"/>
  68. <xsd:attributeGroup ref="scxml.send.attlist"/>
  69. <xsd:assert test="(@event or @eventexpr or content) and not(@expr and @eventexpr)" xpathDefaultNamespace="##targetNamespace"/>
  70. <xsd:assert test="not(@namelist and (param | content))" xpathDefaultNamespace="##targetNamespace"/>
  71. <xsd:assert test="not(@target and @targetexpr)" xpathDefaultNamespace="##targetNamespace"/>
  72. <xsd:assert test="not(@id and @idlocation)" xpathDefaultNamespace="##targetNamespace"/>
  73. <xsd:assert test="not(@type and @typeexpr)" xpathDefaultNamespace="##targetNamespace"/>
  74. <xsd:assert test="not(@delay and @delayexpr)" xpathDefaultNamespace="##targetNamespace"/>
  75. <xsd:assert test="if(@delay or @delayexpr) then (not(@target eq '_internal')) else true()" xpathDefaultNamespace="##targetNamespace"/>
  76. </xsd:complexType>
  77. <xsd:element name="send" type="scxml.send.type"/>
  78. <!-- cancel -->
  79. <xsd:attributeGroup name="scxml.cancel.attlist">
  80. <xsd:attribute name="sendid" type="xsd:IDREF"/>
  81. <xsd:attribute name="sendidexpr" type="ValueLang.datatype"/>
  82. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  83. </xsd:attributeGroup>
  84. <xsd:group name="scxml.cancel.mix">
  85. <xsd:sequence>
  86. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  87. </xsd:sequence>
  88. </xsd:group>
  89. <xsd:group name="scxml.cancel.content">
  90. <xsd:sequence>
  91. <xsd:group ref="scxml.cancel.mix" minOccurs="0" maxOccurs="unbounded"/>
  92. </xsd:sequence>
  93. </xsd:group>
  94. <xsd:complexType name="scxml.cancel.type">
  95. <xsd:group ref="scxml.cancel.content"/>
  96. <xsd:attributeGroup ref="scxml.cancel.attlist"/>
  97. <xsd:assert test="(@sendid or @sendidexpr) and not(@sendid and @sendidexpr)" xpathDefaultNamespace="##targetNamespace"/>
  98. </xsd:complexType>
  99. <xsd:element name="cancel" type="scxml.cancel.type"/>
  100. <!-- invoke -->
  101. <xsd:attributeGroup name="scxml.invoke.attlist">
  102. <xsd:attribute name="type" type="xsd:string" default="scxml"/>
  103. <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
  104. <xsd:attribute name="src" type="URI.datatype"/>
  105. <xsd:attribute name="srcexpr" type="ValueLang.datatype"/>
  106. <xsd:attribute name="id" type="xsd:ID"/>
  107. <xsd:attribute name="idlocation" type="LocLang.datatype"/>
  108. <xsd:attribute name="namelist" type="xsd:string"/>
  109. <xsd:attribute name="autoforward" type="Boolean.datatype" use="optional" default="false"/>
  110. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  111. </xsd:attributeGroup>
  112. <xsd:group name="scxml.invoke.mix">
  113. <xsd:sequence>
  114. <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
  115. <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
  116. <xsd:element ref="finalize" minOccurs="0" maxOccurs="1"/>
  117. <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
  118. </xsd:sequence>
  119. </xsd:group>
  120. <xsd:group name="scxml.invoke.content">
  121. <xsd:sequence>
  122. <xsd:group ref="scxml.invoke.mix" minOccurs="0" maxOccurs="unbounded"/>
  123. </xsd:sequence>
  124. </xsd:group>
  125. <xsd:complexType name="scxml.invoke.type">
  126. <xsd:group ref="scxml.invoke.content"/>
  127. <xsd:attributeGroup ref="scxml.invoke.attlist"/>
  128. <xsd:assert test=" not(@type and @typeexpr)" xpathDefaultNamespace="##targetNamespace"/>
  129. <xsd:assert test=" not(@src and @srcexpr)" xpathDefaultNamespace="##targetNamespace"/>
  130. <xsd:assert test=" not((@src or @srcexpr) and (content | param))" xpathDefaultNamespace="##targetNamespace"/>
  131. <xsd:assert test=" not(@id and @idlocation)" xpathDefaultNamespace="##targetNamespace"/>
  132. <xsd:assert test=" not(@namelist and param)" xpathDefaultNamespace="##targetNamespace"/>
  133. <xsd:assert test=" not(param and content)" xpathDefaultNamespace="##targetNamespace"/>
  134. <xsd:assert test=" not(content[2])" xpathDefaultNamespace="##targetNamespace"/>
  135. </xsd:complexType>
  136. <xsd:element name="invoke" type="scxml.invoke.type"/>
  137. <!-- finalize -->
  138. <xsd:attributeGroup name="scxml.finalize.attlist">
  139. <xsd:attributeGroup ref="scxml.extra.attribs"/>
  140. </xsd:attributeGroup>
  141. <xsd:group name="scxml.finalize.mix">
  142. <xsd:sequence>
  143. <xsd:group ref="scxml.core.executablecontent"/>
  144. </xsd:sequence>
  145. </xsd:group>
  146. <xsd:group name="scxml.finalize.content">
  147. <xsd:sequence>
  148. <xsd:group ref="scxml.finalize.mix" minOccurs="0" maxOccurs="unbounded"/>
  149. </xsd:sequence>
  150. </xsd:group>
  151. <xsd:complexType name="scxml.finalize.type">
  152. <xsd:group ref="scxml.finalize.content"/>
  153. <xsd:attributeGroup ref="scxml.finalize.attlist"/>
  154. <xsd:assert test=" not(send | raise)" xpathDefaultNamespace="##targetNamespace"/>
  155. </xsd:complexType>
  156. <xsd:element name="finalize" type="scxml.finalize.type"/>
  157. </xsd:schema>