String name = attributes.getValue("name");
String name = _ivy.substitute(attributes.getValue("name"));
    private void addDependencyArtifact(Attributes attributes, boolean includes) {        String name = attributes.getValue("name");        name = name == null ? PatternMatcher.ANY_EXPRESSION : name;        String type = attributes.getValue("type");        type = type == null ? PatternMatcher.ANY_EXPRESSION : type;        String ext = attributes.getValue("ext");        ext = ext != null?ext:type;        String matcherName = attributes.getValue("matcher");        PatternMatcher matcher = matcherName == null ? _defaultMatcher : _ivy.getMatcher(matcherName);        if (matcher == null) {            addError("unknown matcher "+matcherName);            return;        }        if (includes) {            _dad = new DefaultDependencyArtifactDescriptor(_dd, name, type, ext, includes, matcher);        } else {            String org = attributes.getValue("org");            org = org == null ? PatternMatcher.ANY_EXPRESSION : org;            String module = attributes.getValue("module");            module = module == null ? PatternMatcher.ANY_EXPRESSION : module;            ArtifactId aid = new ArtifactId(new ModuleId(org, module), name, type, ext);            _dad = new DefaultDependencyArtifactDescriptor(_dd, aid, includes, matcher);        }        String confs = attributes.getValue("conf");        // only add confs if they are specified. if they aren't, endElement will handle this        // only if there are no conf defined in sub elements        if (confs != null && confs.length() > 0) {            String[] conf;            if ("*".equals(confs)) {                conf = _md.getConfigurationsNames();            } else {                conf = confs.split(",");            }            for (int i = 0; i < conf.length; i++) {                _dad.addConfiguration(conf[i].trim());            }        }    }   