Skip to content

Commit

Permalink
Add XML schema
Browse files Browse the repository at this point in the history
  • Loading branch information
falko committed Jan 10, 2024
1 parent 79ea1a7 commit 09d1eda
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
24 changes: 24 additions & 0 deletions bpmn-icon.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<xs:schema id="bpmn-icon" version="0.1"
targetNamespace="http://www.omg.org/spec/BPMN/non-normative/Icon"
xmlns:icon="http://www.omg.org/spec/BPMN/non-normative/Icon"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xs:element name="iconDefinition" type="icon:tIconDefinition"/>

<xs:complexType name="tIconDefinition">
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="href" type="xs:anyURI" use="required"/>
</xs:complexType>

<xs:attributeGroup name="iconRefAttributeGroup">
<xs:attribute name="iconRef" type="xs:QName" use="optional">
<xs:annotation>
<xs:documentation>
This attribute points to the id of the iconDefinition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

</xs:schema>
7 changes: 6 additions & 1 deletion example.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:icon="http://www.omg.org/spec/BPMN/non-normative/Icon"
id="Definitions" targetNamespace="http://example.org">
id="Definitions" targetNamespace="http://example.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.omg.org/spec/BPMN/non-normative/Icon
./bpmn-icon.xsd
">
<process id="ProcessWithIcon">
<startEvent id="StartEvent" />
</process>
Expand Down

0 comments on commit 09d1eda

Please sign in to comment.