123456789101112131415161718192021222324252627282930313233 |
- <?xml version="1.0" encoding="UTF-8"?>
- <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
- <sch:ns uri="http://www.omg.org/spec/BPMN/20100524/MODEL" prefix="bpmn"/>
- <sch:pattern>
- <sch:title>Unique Ids</sch:title>
- <sch:rule context="*[@id]">
- <sch:assert test="not(preceding::*[@id=current()/@id][1]">Id attributes should be unique in a document.</sch:assert>
- </sch:rule>
- </sch:pattern>
- <sch:pattern name="lane id">
- <sch:rule context="bpmn:lane">
- <sch:assert test="@id">The element lane must have an id attribute</sch:assert>
- </sch:rule>
- </sch:pattern>
- <sch:pattern name="sequenceFlow id">
- <sch:rule context="bpmn:lane">
- <sch:assert test="@id">The element sequenceFlow must have an id attribute</sch:assert>
- </sch:rule>
- </sch:pattern>
- <sch:pattern name="id obligatory for other elements">
- <sch:rule context="bpmn:[@intermediateCatchEvent,@parallelGateway,@exclusiveGateway,@inclusiveGateway,@startEvent,@endEvent,@task">
- <sch:assert test="@id">The element intermediateCatchEvent, parallelGateway, exclusiveGateway, inclusiveGateway, startEvent, endEvent, task must have an id attribute</sch:assert>
- </sch:rule>
- </sch:pattern>
- <sch:pattern name="Check source-target constraints">
- <sch:rule context="bpmn:sequenceFlow">
- <sch:assert test="(@sourceRef = '*' and @targetRef = '*') and @sourceRef != ''">Check the target exists.</sch:assert>
- </sch:rule>
- </sch:pattern>
- </sch:schema>
|