    public void startElement(String namespaceURI, String localName, String qName, Attributes attrs) throws SAXException {
        String eName = ("".equals(localName)) ? qName : localName;
        transformedXmlAsBuffer.append("<" + eName);
        if(eName.equals("Link")) {
            for(int i = 0; i < attrs.getLength(); i++) {
                String aName = attrs.getQName(i);
                String aValue = attrs.getValue(i);
                if(aName.equals("href")) {
                    if(aValue.startsWith("external_")) {
                        aValue = aValue.substring(9);
                    } else {
                        boolean externalLink = false;
                        for(int j=0; j<externalLinks.length; j++) {
                            if(aValue.startsWith(externalLinks[j])) {
                                externalLink = true;
                                break;
                            }
                        }
                        if(!externalLink && !resourceExists(aValue)) {
                            log.error("Resource : [" + aValue + "] does not exist");
                            transformedXmlAsBuffer.append(" exist=\"false\"");
                        }
                    }
                }
                transformedXmlAsBuffer.append(" " + aName + "=\"" + aValue + "\"");
            }  
        } else {
            for(int i = 0; i < attrs.getLength(); i++) {
                String aName = attrs.getQName(i);
                String aValue = attrs.getValue(i);
                StringBuffer tmp = new StringBuffer();
                for(int j=0; j<aValue.length(); j++) {
                    if(aValue.charAt(j) == '"') tmp.append("&#34;");
                    else tmp.append(aValue.charAt(j));
                }
                transformedXmlAsBuffer.append(" " + aName + "=\"" + tmp.toString() + "\"");
            }
        }
        transformedXmlAsBuffer.append(">");
    }

    public void startElement(String namespaceURI, String localName, String qName, Attributes attrs) throws SAXException {
        String eName = ("".equals(localName)) ? qName : localName;
        transformedXmlAsBuffer.append("<" + eName);
        if(eName.equals("Link")) {
            for(int i = 0; i < attrs.getLength(); i++) {
                String aName = attrs.getQName(i);
                String aValue = attrs.getValue(i);
                if(aName.equals("href")) {
                    if(aValue.startsWith("external_")) {
                        aValue = aValue.substring(9);
                    } else {
                        boolean externalLink = false;
                        for(int j=0; j<externalLinks.length; j++) {
                            if(aValue.startsWith(externalLinks[j])) {
                                externalLink = true;
                                break;
                            }
                        }
                        if(!externalLink && !resourceExists(aValue)) {
                            log.warn("Link : [" + aValue + "] does not exist");
                            transformedXmlAsBuffer.append(" exist=\"false\"");
                        }
                    }
                }
                transformedXmlAsBuffer.append(" " + aName + "=\"" + aValue + "\"");
            }  
        } else {
            for(int i = 0; i < attrs.getLength(); i++) {
                String aName = attrs.getQName(i);
                String aValue = attrs.getValue(i);
                StringBuffer tmp = new StringBuffer();
                for(int j=0; j<aValue.length(); j++) {
                    if(aValue.charAt(j) == '"') tmp.append("&#34;");
                    else tmp.append(aValue.charAt(j));
                }
                transformedXmlAsBuffer.append(" " + aName + "=\"" + tmp.toString() + "\"");
            }
        }
        transformedXmlAsBuffer.append(">");
    }
