/* */ private final void buildIDIndex(DOM document) /* */ { /* 322 */ setRootForKeys(document.getDocument()); /* */ /* 324 */ if ((document instanceof DOMEnhancedForDTM)) { /* 325 */ DOMEnhancedForDTM enhancedDOM = (DOMEnhancedForDTM) document; /* */ /* 330 */ if (enhancedDOM.hasDOMSource()) { /* 331 */ buildKeyIndex("##id", document); /* 332 */ return; /* */ } /* */ /* 335 */ Hashtable elementsByID = enhancedDOM.getElementsWithIDs(); /* */ /* 337 */ if (elementsByID == null) { /* 338 */ return; /* */ } /* */ /* 344 */ Enumeration idValues = elementsByID.keys(); /* 345 */ boolean hasIDValues = false; /* */ /* 347 */ while (idValues.hasMoreElements()) { /* 348 */ Object idValue = idValues.nextElement(); /* 349 */ int element = document.getNodeHandle(((Integer) elementsByID.get(idValue)).intValue()); /* */ /* 354 */ buildKeyIndex("##id", element, idValue); /* 355 */ hasIDValues = true; /* */ } /* */ /* 358 */ if (hasIDValues) /* 359 */ setKeyIndexDom("##id", document); /* */ } /* */ }
/* */ public final DOMAdapter makeDOMAdapter(DOM dom) /* */ throws TransletException /* */ { /* 135 */ setRootForKeys(dom.getDocument()); /* 136 */ return new DOMAdapter( dom, this.namesArray, this.urisArray, this.typesArray, this.namespaceArray); /* */ }