rectify-schematron.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
  3. <sch:ns uri="http://www.omg.org/spec/BPMN/20100524/MODEL" prefix="bpmn"/>
  4. <sch:pattern>
  5. <sch:title>Unique Ids</sch:title>
  6. <sch:rule context="*[@id]">
  7. <sch:assert test="not(preceding::*[@id=current()/@id][1]">Id attributes should be unique in a document.</sch:assert>
  8. </sch:rule>
  9. </sch:pattern>
  10. <sch:pattern name="lane id">
  11. <sch:rule context="bpmn:lane">
  12. <sch:assert test="@id">The element lane must have an id attribute</sch:assert>
  13. </sch:rule>
  14. </sch:pattern>
  15. <sch:pattern name="sequenceFlow id">
  16. <sch:rule context="bpmn:lane">
  17. <sch:assert test="@id">The element sequenceFlow must have an id attribute</sch:assert>
  18. </sch:rule>
  19. </sch:pattern>
  20. <sch:pattern name="id obligatory for other elements">
  21. <sch:rule context="bpmn:[@intermediateCatchEvent,@parallelGateway,@exclusiveGateway,@inclusiveGateway,@startEvent,@endEvent,@task">
  22. <sch:assert test="@id">The element intermediateCatchEvent, parallelGateway, exclusiveGateway, inclusiveGateway, startEvent, endEvent, task must have an id attribute</sch:assert>
  23. </sch:rule>
  24. </sch:pattern>
  25. <sch:pattern name="Check source-target constraints">
  26. <sch:rule context="bpmn:sequenceFlow">
  27. <sch:assert test="(@sourceRef = '*' and @targetRef = '*') and @sourceRef != ''">Check the target exists.</sch:assert>
  28. </sch:rule>
  29. </sch:pattern>
  30. </sch:schema>