final Vector implementations = new Vector();
int size = sources.size();
for (int i = 0; i < size; i++) {
DOMImplementationSource source =
(DOMImplementationSource) sources.elementAt(i);
DOMImplementationList impls =
source.getDOMImplementationList(features);
for (int j = 0; j < impls.getLength(); j++) {
DOMImplementation impl = impls.item(j);
implementations.addElement(impl);
}
}
return new DOMImplementationList() {
public DOMImplementation item(final int index) {
if (index >= 0 && index < implementations.size()) {
try {
return (DOMImplementation)
implementations.elementAt(index);