Skip to content

Commit

Permalink
update scxml schema to match current conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
dholzmann committed Nov 28, 2024
1 parent cdb5667 commit 415bcbe
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions bonsai_scxml_engine/src/main/resources/scxml-schema/scxml.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,25 @@
<!-- state -->
<xsd:attributeGroup name="scxml.state.attlist">
<xsd:attribute name="id" type="bonsai.scxml.id"/>
<xsd:attribute name="src" type="bonsai.scxml.id"/>
<xsd:attribute name="initial" type="xsd:IDREFS"/>
<xsd:attributeGroup ref="scxml.extra.attribs"/>
</xsd:attributeGroup>

<xsd:simpleType name="bonsai.scxml.id.nuq" id="ID.nuq">
<xsd:restriction base="xsd:string">
<xsd:pattern value="^#?( [a-zA-Z_$][a-zA-Z\d_$]*&period;)*[a-zA-Z_$][a-zA-Z\d_$]*" id="NCName.pattern.nuq">
</xsd:pattern>
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="bonsai.scxml.id" id="ID">
<xsd:restriction base="bonsai.scxml.NCNAME"/>
</xsd:simpleType>

<xsd:simpleType name="bonsai.scxml.NCNAME" id="NCName">
<xsd:restriction base="xsd:Name">
<xsd:pattern value="([a-zA-Z_$][a-zA-Z\d_$]*\.)*[a-zA-Z_$][a-zA-Z\d_$]*" id="NCName.pattern">
<xsd:pattern value="^#?( [a-zA-Z_$][a-zA-Z\d_$]*&period;)*[a-zA-Z_$][a-zA-Z\d_$]*" id="NCName.pattern">
</xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
Expand Down Expand Up @@ -318,13 +325,15 @@
<xsd:group name="scxml.onentry.content">
<xsd:sequence>
<xsd:group maxOccurs="unbounded" minOccurs="0" ref="scxml.core.executablecontent"/>
<xsd:element name="assign" type="scxml.assign.type"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="scxml.onentry.type">
<xsd:group ref="scxml.onentry.content"/>
<xsd:attributeGroup ref="scxml.onentry.attlist"/>
</xsd:complexType>
<xsd:element name="onentry" type="scxml.onentry.type"/>

<!-- onexit -->
<xsd:attributeGroup name="scxml.onexit.attlist">
<xsd:attributeGroup ref="scxml.extra.attribs"/>
Expand Down Expand Up @@ -603,7 +612,7 @@
<xsd:element name="datamodel" type="scxml.datamodel.type"/>
<!-- data -->
<xsd:attributeGroup name="scxml.data.attlist">
<xsd:attribute name="id" type="xsd:ID" use="required"/>
<xsd:attribute name="id" type="bonsai.scxml.id.nuq" use="required"/>
<xsd:attribute name="src" type="URI.datatype"/>
<xsd:attribute name="expr" type="ValueLang.datatype"/>
<xsd:attributeGroup ref="scxml.extra.attribs"/>
Expand Down Expand Up @@ -637,10 +646,12 @@
<xsd:element name="param" type="scxml.param.type"/>
<!-- assign -->
<xsd:attributeGroup name="scxml.assign.attlist">
<xsd:attribute name="location" type="LocLang.datatype" use="required"/>

<xsd:attribute name="location" type="LocLang.datatype"/>
<xsd:attribute name="expr" type="ValueLang.datatype"/>
<xsd:attribute default="replacechildren" name="type" type="AssignType.datatype"/>
<xsd:attribute name="attr" type="xsd:NMTOKEN"/>
<xsd:attribute name="name" type="xsd:NCName"/>
<xsd:attributeGroup ref="scxml.extra.attribs"/>
</xsd:attributeGroup>
<xsd:group name="scxml.assign.content">
Expand Down

0 comments on commit 415bcbe

Please sign in to comment.