for (int i = 0; i < list.getLength(); i++)
{
Element shape = (Element) list.item(i);
mxStencilRegistry.addStencil(shape.getAttribute("name"),
new mxStencil(shape)
{
protected mxGraphicsCanvas2D createCanvas(
final mxGraphics2DCanvas gc)
{
// Redirects image loading to graphics canvas