source = baseDir + source;
source = makeUrl(baseDir + source);
    private Image unmarshalImage(Node t, String baseDir)        throws MalformedURLException, IOException    {        Image img = null;        String source = getAttributeValue(t, "source");                if (source != null) {            if (Util.checkRoot(source)) {                source = makeUrl(source);            } else {                source = baseDir + source;            }            img = ImageIO.read(new URL(source));        } else {            NodeList nl = t.getChildNodes();            for (int i = 0; i < nl.getLength(); i++) {                Node n = nl.item(i);                if (n.getNodeName().equals("data")) {                    Node cdata = n.getFirstChild();                    if (cdata == null) {                        warnings.push("WARN: image <data> tag enclosed no " +                                "data. (empty data tag)");                    } else {                        String sdata = cdata.getNodeValue();                        img = ImageHelper.bytesToImage(                            Base64.decode(sdata.trim().toCharArray()));                    }                    break;                }            }        }        /*        if (getAttributeValue(t, "set") != null) {            TileSet ts = (TileSet)map.getTilesets().get(                    Integer.parseInt(getAttributeValue(t, "set")));            if (ts != null) {                ts.addImage(img);            }        }        */                return img;    }