Skip to content

Commit

Permalink
Adjust namespaces per OMG policy
Browse files Browse the repository at this point in the history
  • Loading branch information
falko committed Sep 4, 2024
1 parent d4ed275 commit 6c610bc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 32 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ containers permit `extensionElements`.
Therefore, this extension uses a top-level `bpmn:relationship` as a container, e.g.

```xml
<relationship type="icons">
<extensionElements>
<icon:iconDefinition id="WebhookIcon" href="data:image/svg+xml,%3Csvg id=&#39;icon&#39; xmlns=&#39;http://www.w3.org/2000/svg&#39; width=&#39;18&#39; height=&#39;18&#39; viewBox=&#39;0 0 32 32&#39;%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: none; %7D %3C/style%3E%3C/defs%3E%3Cpath d=&#39;M24,26a3,3,0,1,0-2.8164-4H13v1a5,5,0,1,1-5-5V16a7,7,0,1,0,6.9287,8h6.2549A2.9914,2.9914,0,0,0,24,26Z&#39;/%3E%3Cpath d=&#39;M24,16a7.024,7.024,0,0,0-2.57.4873l-3.1656-5.5395a3.0469,3.0469,0,1,0-1.7326.9985l4.1189,7.2085.8686-.4976a5.0006,5.0006,0,1,1-1.851,6.8418L17.937,26.501A7.0005,7.0005,0,1,0,24,16Z&#39;/%3E%3Cpath d=&#39;M8.532,20.0537a3.03,3.03,0,1,0,1.7326.9985C11.74,18.47,13.86,14.7607,13.89,14.708l.4976-.8682-.8677-.497a5,5,0,1,1,6.812-1.8438l1.7315,1.002a7.0008,7.0008,0,1,0-10.3462,2.0356c-.457.7427-1.1021,1.8716-2.0737,3.5728Z&#39;/%3E%3Crect id=&#39;_Transparent_Rectangle_&#39; data-name=&#39;&#38;lt;Transparent Rectangle&#38;gt;&#39; class=&#39;cls-1&#39; width=&#39;32&#39; height=&#39;32&#39;/%3E%3C/svg%3E" />
</extensionElements>
<source>Definitions</source>
<target>Definitions</target>
</relationship>
<bpmn:definitions id="IconExample" ...>
...
<bpmn:relationship type="icons">
<bpmn:extensionElements>
<icon:iconDefinition id="WebhookIcon" href="data:image/svg+xml,%3Csvg id=&#39;icon&#39; xmlns=&#39;http://www.w3.org/2000/svg&#39; width=&#39;18&#39; height=&#39;18&#39; viewBox=&#39;0 0 32 32&#39;%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: none; %7D %3C/style%3E%3C/defs%3E%3Cpath d=&#39;M24,26a3,3,0,1,0-2.8164-4H13v1a5,5,0,1,1-5-5V16a7,7,0,1,0,6.9287,8h6.2549A2.9914,2.9914,0,0,0,24,26Z&#39;/%3E%3Cpath d=&#39;M24,16a7.024,7.024,0,0,0-2.57.4873l-3.1656-5.5395a3.0469,3.0469,0,1,0-1.7326.9985l4.1189,7.2085.8686-.4976a5.0006,5.0006,0,1,1-1.851,6.8418L17.937,26.501A7.0005,7.0005,0,1,0,24,16Z&#39;/%3E%3Cpath d=&#39;M8.532,20.0537a3.03,3.03,0,1,0,1.7326.9985C11.74,18.47,13.86,14.7607,13.89,14.708l.4976-.8682-.8677-.497a5,5,0,1,1,6.812-1.8438l1.7315,1.002a7.0008,7.0008,0,1,0-10.3462,2.0356c-.457.7427-1.1021,1.8716-2.0737,3.5728Z&#39;/%3E%3Crect id=&#39;_Transparent_Rectangle_&#39; data-name=&#39;&#38;lt;Transparent Rectangle&#38;gt;&#39; class=&#39;cls-1&#39; width=&#39;32&#39; height=&#39;32&#39;/%3E%3C/svg%3E"/>
</bpmn:extensionElements>
<bpmn:source>IconExample</bpmn:source>
<bpmn:target>IconExample</bpmn:target>
</bpmn:relationship>
</bpmn:definitions>
```

The relationship's `source` and `target` MUST point to the `id` of the `bpmn:definitions` root element.
Expand Down
6 changes: 4 additions & 2 deletions bpmn-icon.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<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"
targetNamespace="https://www.omg.org/spec/BPMN/non-normative/Icon"
xmlns:icon="https://www.omg.org/spec/BPMN/non-normative/Icon"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

Expand Down
37 changes: 14 additions & 23 deletions example.bpmn
Original file line number Diff line number Diff line change
@@ -1,36 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="IconExample"
<bpmn:definitions id="IconExample"
targetNamespace="http://example.org"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.omg.org/spec/BPMN/20100524/MODEL
./BPMN20-with-Icon.xsd
http://www.omg.org/spec/BPMN/20100524/DI
./BPMNDI-with-iconRef.xsd
http://www.omg.org/spec/DD/20100524/DC
./BPMN/DC.xsd
http://www.omg.org/spec/BPMN/non-normative/Icon
./bpmn-icon.xsd
">
<process id="ProcessWithIcon">
<startEvent id="StartEvent"/>
</process>
xmlns:icon="https://www.omg.org/spec/BPMN/non-normative/Icon"
>
<bpmn:process id="ProcessWithIcon">
<bpmn:startEvent id="StartEvent"/>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram">
<bpmndi:BPMNPlane id="BPMNPlane" bpmnElement="ProcessWithIcon">
<bpmndi:BPMNShape id="StartEvent_di" bpmnElement="StartEvent" icon:iconRef="WebhookIcon">
<dc:Bounds x="150" y="100" width="36" height="36"/>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<relationship type="icons">
<extensionElements>
<bpmn:relationship type="icons">
<bpmn:extensionElements>
<icon:iconDefinition id="WebhookIcon" href="data:image/svg+xml,%3Csvg id=&#39;icon&#39; xmlns=&#39;http://www.w3.org/2000/svg&#39; width=&#39;18&#39; height=&#39;18&#39; viewBox=&#39;0 0 32 32&#39;%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: none; %7D %3C/style%3E%3C/defs%3E%3Cpath d=&#39;M24,26a3,3,0,1,0-2.8164-4H13v1a5,5,0,1,1-5-5V16a7,7,0,1,0,6.9287,8h6.2549A2.9914,2.9914,0,0,0,24,26Z&#39;/%3E%3Cpath d=&#39;M24,16a7.024,7.024,0,0,0-2.57.4873l-3.1656-5.5395a3.0469,3.0469,0,1,0-1.7326.9985l4.1189,7.2085.8686-.4976a5.0006,5.0006,0,1,1-1.851,6.8418L17.937,26.501A7.0005,7.0005,0,1,0,24,16Z&#39;/%3E%3Cpath d=&#39;M8.532,20.0537a3.03,3.03,0,1,0,1.7326.9985C11.74,18.47,13.86,14.7607,13.89,14.708l.4976-.8682-.8677-.497a5,5,0,1,1,6.812-1.8438l1.7315,1.002a7.0008,7.0008,0,1,0-10.3462,2.0356c-.457.7427-1.1021,1.8716-2.0737,3.5728Z&#39;/%3E%3Crect id=&#39;_Transparent_Rectangle_&#39; data-name=&#39;&#38;lt;Transparent Rectangle&#38;gt;&#39; class=&#39;cls-1&#39; width=&#39;32&#39; height=&#39;32&#39;/%3E%3C/svg%3E"/>
</extensionElements>
<source>IconExample</source>
<target>IconExample</target>
</relationship>
</definitions>
</bpmn:extensionElements>
<bpmn:source>IconExample</bpmn:source>
<bpmn:target>IconExample</bpmn:target>
</bpmn:relationship>
</bpmn:definitions>

0 comments on commit 6c610bc

Please sign in to comment.