Using of classes and ID´s
If you use classes or ID´s, either to specify styles or to link to other parts of the SVG within the SVG,
problems can occur if an SVG control is used multiple times in the project.
The problem arises because the SVG content is loaded multiple times in the browser/viewer when using
multiple controls, resulting in multiple definitions of the same class or ID.
To prevent this, you can add the prefix _elementid_ to class and ID names.
This prefix is automatically replaced at runtime by the unique ID of each control.
This results in unique classes and ID names for each individual control.
Here is an excerpt from a syntax as an example:
<g>
<defs>
<radialGradient id="_elementid_c1" cx="0.5" cy="0.5" r="0.5">
<stop offset="0" stop-color="#F7F7F7"></stop>
<stop offset=".5" stop-color="#C0C0C0"></stop>
<stop offset="1" stop-color="#898989"></stop>
</radialGradient>
<linearGradient id="_elementid_c2" x1="0" y1="0.5" x2="1.2" y2="0.6">
<stop offset="0" stop-color="#F7F7F7"></stop>
<stop offset=".5" stop-color="#C0C0C0"></stop>
<stop offset="1" stop-color="#898989"></stop>
</linearGradient>
<linearGradient id="_elementid_c3" x1="0" y1="0.5" x2="1.2" y2="0.6">
<stop offset="0" stop-color="#FF0000"></stop>
<stop offset=".3" stop-color="#F2F2F2"></stop>
<stop offset=".4" stop-color="#FFFFFF"></stop>
</linearGradient>
</defs>