}};
return result;
}
private Map enumerateNames(Collection namePatterns) {
PatternList pl = new PatternList();
for (Iterator i = namePatterns.iterator(); i.hasNext();)
pl.addRegexp(fixupPattern((String) i.next()));
if (pl.getContainsItems() != null || pl.getRegexpItems() != null
|| pl.getStartsWithItems() != null
|| pl.getEqualsItems() != null)
throw new UnsupportedOperationException();
Map result = new HashMap();
for (Iterator i = pl.getEndsWithItems().iterator(); i.hasNext();) {
String oneItem = (String) i.next();
String rootTag = null;
int tagEnd = oneItem.indexOf(TAG_SEP_CHAR);
if (tagEnd != -1) {
rootTag = oneItem.substring(0, tagEnd);