I have rectangles with centered text in them. When I export this to SVG, it is quite verbose and does not use the proper SVG centering mechanism, see excerpt at the bottom.
When I now use some XSLT to change some of the labels and the new labels are different in length, they are not centered anymore because the position is hardcoded, thus I request to change the export to use the SVG attributes dominant-baseline="middle" and text-anchor="middle" (and the label being positioned in the center of the rectangle).
This is very well explained in this StackOverflow answer, however there may be an even better way.
<g class="node" id="EnterpriseFunctionClassified">
<g fill="rgb(255,204,153)" text-rendering="geometricPrecision" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,-80,-95)" stroke="rgb(255,204,153)">
<rect x="741" y="212" width="201.25" rx="4" ry="4" height="30" stroke="none"/>
</g>
<g text-rendering="geometricPrecision" stroke-miterlimit="1.45" shape-rendering="geometricPrecision" transform="matrix(1,0,0,1,-80,-95)" stroke-linecap="butt">
<rect x="741" y="212" fill="none" width="201.25" rx="4" ry="4" height="30"/>
</g>
<g>
<g text-rendering="geometricPrecision" stroke-miterlimit="1.45" shape-rendering="geometricPrecision" font-family="sans-serif" transform="matrix(1,0,0,1,-80,-95)" stroke-linecap="butt">
<text x="765.27" xml:space="preserve" y="229.75" stroke="none">terminology items</text>
</g>
</g>
</g>