Artefact:Template/org/oomodels/converter/templates/simplediagram-1.0-svg-1.1

Code
 G-2.0-xml_string-1.0 -*- coding: utf-8; -*-   ⋮▼import java.util.HashMap;▼… ⋮«HashMap items_by_pos = new HashMap;»… ⋮«∀(a:‖"Ⓧ/Diagram/Item"){»… ⋮« String name = ((XMLNode)‖"Ⓧ/@Name").toString; String type = ((XMLNode) ‖"Ⓧ/@Type" ).toString; int len = name.length; int count = 0; ∀(e:‖"Ⓧ/Entry"){ String entry = ((XMLNode)‖"Ⓧ/@Text").toString; if (entry.length > len) { len = entry.length; } count++; }/∀    int width = len * 10; int height = count * 24 + 44; int x = Integer.parseInt(((XMLNode)(‖"Ⓧ/@X")).toString); int y = Integer.parseInt(((XMLNode)(‖"Ⓧ/@Y")).toString); Integer[] box = { 8*x, 16*y, 8*x+width, 16*y+height }; items_by_pos.put(""+x+"-"+y+"", box); »…   ⋮«if(type.equals("Class")){»…   ⋮«if(count != 0){»…  ⋮«}»…    ⋮«}»…     ⋮«if(type.equals("StateMachine")){»…   ⋮«if(count != 0){»…  ⋮«}»…    ⋮«}»…     ⋮«if(type.equals("Step")){»…   ⋮«if(count != 0){»…  ⋮«}»…    ⋮«}»…     ⋮«if(type.equals("Constellation")){»…   ⋮«if(count != 0){»… <path style="stroke:#000000;stroke-width:1px;" d="M 2,44 L ◂20+width▸,44 "/> ⋮«}»…    ⋮«}»…      <text y="26" x="◂1+(width/2)▸" style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;                  text-align:center;text-anchor:middle;fill:#000000;font-family:Sans">◂name▸ ⋮«∀(e:‖"Ⓧ/Entry"){»… <text y="◂62+Ⓘ*24▸" x="1" style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;                  text-align:center;text-anchor:left;fill:#000000;font-family:Sans">◂‖"Ⓧ/@Text"▸ ⋮«}/∀»…   </g> </a> ⋮«}/∀»… ⋮«∀(a:‖"Ⓧ/Diagram/Generalization"){»… ⋮«      int fromx = Integer.parseInt(((XMLNode)(‖"Ⓧ/@FromX")).toString); int fromy = Integer.parseInt(((XMLNode)(‖"Ⓧ/@FromY")).toString); int tox = Integer.parseInt(((XMLNode)(‖"Ⓧ/@ToX")).toString); int toy = Integer.parseInt(((XMLNode)(‖"Ⓧ/@ToY")).toString); Integer[] fb = (Integer[]) items_by_pos.get(""+fromx+"-"+fromy+""); Integer[] tb = (Integer[]) items_by_pos.get(""+tox+"-"+toy+""); int fx = ((fb[2]+fb[0])/2); int fy = fb[1]; int tx = ((tb[2]+tb[0])/2); int ty = tb[3]; »…   <g> <path style="fill:none;stroke-opacity:1;stroke:#000000;stroke-width:1px" d="M ◂tx▸,◂ty▸ L ◂tx-10▸,◂ty+10▸ L ◂tx+10▸,◂ty+10▸ L ◂tx▸,◂ty▸ z "/> <path style="fill:none;stroke-opacity:1;stroke:#000000;stroke-width:1px" d="M ◂fx▸,◂fy▸ …                                     ⋮«if(fy-ty>40){»…                              ⋮L ◂fx▸,◂(fy+ty+10)/2▸ L ◂tx▸,◂(fy+ty+10)/2▸ …                                      ⋮«}else{»…                              ⋮L ◂fx▸,◂fy-20▸ L ◂(fx+tx)/2▸,◂fy-20▸ L ◂(fx+tx)/2▸,◂ty+30▸ L ◂tx▸,◂ty+30▸ …                                      ⋮«}»…                              ⋮L ◂tx▸,◂ty+10▸ "/> </g> ⋮«}/∀»… ⋮«∀(a:‖"Ⓧ/Diagram/Association"){»… ⋮«      int fromx = Integer.parseInt(((XMLNode)(‖"Ⓧ/@FromX")).toString); int fromy = Integer.parseInt(((XMLNode)(‖"Ⓧ/@FromY")).toString); int tox = Integer.parseInt(((XMLNode)(‖"Ⓧ/@ToX")).toString); int toy = Integer.parseInt(((XMLNode)(‖"Ⓧ/@ToY")).toString); Integer[] fb = (Integer[]) items_by_pos.get(""+fromx+"-"+fromy+""); Integer[] tb = (Integer[]) items_by_pos.get(""+tox+"-"+toy+""); int fx = fb[2]; int fy = ((fb[3]+fb[1])/2); int tx = tb[0]; int ty = ((tb[3]+tb[1])/2); »…   <g> <path style="fill:none;stroke-opacity:1;stroke:#000000;stroke-width:1px" d="M ◂fx▸,◂fy▸ …                                     ⋮«if(tx-fx>40){»…                              ⋮L ◂(fx+tx)/2▸,◂fy▸ L ◂(fx+tx)/2▸,◂ty▸ …                                      ⋮«}else{»…                              ⋮L ◂fx+20▸,◂fy▸ L ◂fx+20▸,◂(fy+ty)/2▸ L ◂fx-20▸,◂(fy+ty)/2▸ L ◂fx-20▸,◂ty▸ …                                      ⋮«}»…                              ⋮L ◂tx▸,◂ty▸ "/> </g> ⋮«}/∀»… </OOMCode>