private void writeBpmnDiagramBounds(Bounds bounds) { if (bounds != null && bounds.isValid()) { startElement(xml.createElement(OMG_DC_URI, "Bounds")); xml.addAttribute(OMG_DC_URI, "height", bounds.getHeight()); xml.addAttribute(OMG_DC_URI, "width", bounds.getWidth()); xml.addAttribute(OMG_DC_URI, "x", bounds.upperLeft.x-xOffset); xml.addAttribute(OMG_DC_URI, "y", bounds.upperLeft.y-yOffset); endElement(); } }