for (Map.Entry<String,String> e : m1.entrySet())
types.put(e.getKey(), m3.get(m2.get(e.getValue())));
} else if (u.endsWith(".rrng") || u.endsWith(".rng")) {
Grammar rrng = rngparser.parse(url);
if (!rrng.check(System.err))
throw new ParseException("Schema is not Restricted RELAX NG " + url);
if (extend)
rrng2xg.extend(rrng);
else
xg = rrng2xg.convert(rrng);
Map<String,String> m1 = rngparser.getTopLevelNewNames();
Map<String,SequenceNode> m2 = rrng2xg.getDefineNodes();
for (Map.Entry<String,String> e : m1.entrySet())
types.put(e.getKey(), m2.get(e.getValue()));
} else
throw new ParseException("Unrecognized schema type " + url);
if (extend)
return types;
else {
schemas.add(new ConvertedSchema(xg, types));
return null;