+"\" module=\""+attributes.getValue("module")+"\"");
+"\" module=\""+substitute(ivy, attributes.getValue("module"))+"\"");
                public void startElement(String uri, String localName,                        String qName, Attributes attributes)                        throws SAXException {                    if (_justOpen != null) {                        out.print(">");                    }                    if ("info".equals(qName)) {                        _organisation = attributes.getValue("organisation");                        out.print("<info organisation=\""+_organisation                                				+"\" module=\""+attributes.getValue("module")+"\"");                        if (revision != null) {                            out.print(" revision=\""+revision+"\"");                        } else if (attributes.getValue("revision") != null) {                            out.print(" revision=\""+attributes.getValue("revision")+"\"");                        }                        if (status != null) {                            out.print(" status=\""+status+"\"");                        } else {                            out.print(" status=\""+attributes.getValue("status")+"\"");                        }                        if (pubdate != null) {                            out.print(" publication=\""+Ivy.DATE_FORMAT.format(pubdate)+"\"");                        } else if (attributes.getValue("publication") != null) {                            out.print(" publication=\""+attributes.getValue("publication")+"\"");                        }                        if (resolverName != null) {                            out.print(" resolver=\""+resolverName+"\"");                        } else if (attributes.getValue("resolver") != null) {                            out.print(" resolver=\""+attributes.getValue("resolver")+"\"");                        }                    } else if (replaceImport && "import".equals(qName)) {                        try {                            URL url;                            String fileName = ivy.substitute(attributes.getValue("file"));                            if (fileName == null) {                                String urlStr = ivy.substitute(attributes.getValue("url"));                                url = new URL(urlStr);                            } else {                                url = new File(fileName).toURL();                            }                                 XMLHelper.parse(url, null, new DefaultHandler() {                                boolean _first = true;                                public void startElement(String uri, String localName,                                        String qName, Attributes attributes)                                        throws SAXException {                                    if ("configurations".equals(qName)) {                                        String defaultconf = attributes.getValue("defaultconfmapping");                                        if (defaultconf != null) {                                            _defaultConfMapping = defaultconf;                                        }                                    } else if ("conf".equals(qName)) {                                        // copy                                        if (!_first) {                                            out.print("/>\n\t\t");                                        } else {                                            _first = false;                                        }                                        out.print("<"+qName);                                        for (int i=0; i<attributes.getLength(); i++) {                                            out.print(" "+attributes.getQName(i)+"=\""+attributes.getValue(i)+"\"");                                        }                                    }                                }                            });                        } catch (Exception e) {                            Message.warn("exception occured while importing configurations: "+e.getMessage());                            throw new SAXException(e);                        }                    } else if ("dependency".equals(qName)) {                        out.print("<dependency");                        String org = attributes.getValue("org");                        org = org == null ? _organisation : org;                        ModuleId mid = new ModuleId(org, attributes.getValue("name"));                        for (int i=0; i<attributes.getLength(); i++) {                            String attName = attributes.getQName(i);                            if ("rev".equals(attName)) {                                String rev = (String)resolvedRevisions.get(mid);                                if (rev != null) {                                    out.print(" rev=\""+rev+"\"");                                } else {                                    out.print(" rev=\""+attributes.getValue("rev")+"\"");                                }                            } else {                                out.print(" "+attName+"=\""+attributes.getValue(attName)+"\"");                            }                        }                    } else if ("dependencies".equals(qName)) {                        // copy                        out.print("<"+qName);                        for (int i=0; i<attributes.getLength(); i++) {                            out.print(" "+attributes.getQName(i)+"=\""+attributes.getValue(i)+"\"");                        }                        // add defaultconf mapping if needed                        if (_defaultConfMapping != null && attributes.getValue("defaultconf") == null) {                            out.print(" defaultconf=\""+_defaultConfMapping+"\"");                        }                    } else {                        // copy                        out.print("<"+qName);                        for (int i=0; i<attributes.getLength(); i++) {                            out.print(" "+attributes.getQName(i)+"=\""+attributes.getValue(i)+"\"");                        }                    }                    _justOpen = qName;//                    indent.append("\t");                }