@Override
    public void startElement(String uri, String localName, String name,
            Attributes atts) throws SAXException {
        if (depthInLink > 0) {
            depthInLink++;
        } else if ("http://www.w3.org/1999/xhtml" == uri && "a" == name) {
            depthInLink = 1;
            return;
        }
        if ("http://www.w3.org/1999/xhtml" == uri && "img" == name) {
            String alt = null;
            String src = null;
            int width = -1;
            int height = -1;
            
            int len = atts.getLength();
            for (int i = 0; i < len; i++) {
                if ("" == atts.getURI(i)) {
                    String n = atts.getLocalName(i);
                    if ("src" == n) {
                        src = context.toAbsoluteUriWithCurrentBase(atts.getValue(i));
                    } else if ("alt" == n) {
                        alt = atts.getValue(i);
                    } else if ("width" == n) {
                        // XXX deal with percentages
                        width = AttributeUtil.parsePositiveInteger(atts.getValue(i));
                    } else if ("height" == n) {
                        // XXX deal with percentages
                        height = AttributeUtil.parsePositiveInteger(atts.getValue(i));
                    }
                }
            }
            Image image = new Image(src, alt, context.currentLanguage(), context.isCurrentRtl(), width, height, depthInLink > 0, locator);
            sourceCode.registerRandeEnd(image);
            images.add(image);
        }
    }
@see org.xml.sax.ContentHandler#characters(char[], int, int)
src/nu/validator/servlet/imagereview/ImageCollector.java