}
write("<extends");
String org = substitute(settings, attributes.getValue("organisation"));
String module = substitute(settings, attributes.getValue("module"));
ModuleId parentId = new ModuleId(org, module);
for (int i = 0; i < attributes.getLength(); i++) {
String name = attributes.getQName(i);
String value = null;
if ("revision".equals(name)) {
// replace inline revision with resolved parent revision
ModuleDescriptor merged = options.getMergedDescriptor();
if (merged != null) {
ExtendsDescriptor[] parents = merged.getInheritedDescriptors();
for (int j = 0; value == null && j < parents.length; ++j) {
ModuleRevisionId resolvedId = parents[j].getResolvedParentRevisionId();
if (parentId.equals(resolvedId.getModuleId())) {
value = resolvedId.getRevision();
}
}
}
if (value == null) {