/** * Creates a new link. */ public Link(Link n) { table = new HashTable(); next = n; if (next != null) defaultStr = next.defaultStr; } }
/** * Returns the pseudo attributes in a table. */ public HashTable getPseudoAttributes() { if (pseudoAttributes == null) { pseudoAttributes = new HashTable(); pseudoAttributes.put("alternate", "no"); pseudoAttributes.put("media", "all"); DOMUtilities.parseStyleSheetPIData(data, pseudoAttributes); } return pseudoAttributes; }
/** * Extracts the first XSL processing instruction from the input * XML document. */ protected String extractXSLProcessingInstruction(Document doc) { Node child = doc.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) { ProcessingInstruction pi = (ProcessingInstruction)child; HashTable table = new HashTable(); DOMUtilities.parseStyleSheetPIData(pi.getData(), table); Object type = table.get(PSEUDO_ATTRIBUTE_TYPE); if (XSL_PROCESSING_INSTRUCTION_TYPE.equals(type)) { Object href = table.get(PSEUDO_ATTRIBUTE_HREF); if (href != null) { return href.toString(); } else { return null; } } } child = child.getNextSibling(); } return null; }
/** * Registers an event listener that will not be stopped by the usual * XBL stopping. */ public void addImplementationEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture) { HashTable listeners; if (useCapture) { if (capturingImplementationListeners == null) { capturingImplementationListeners = new HashTable(); } listeners = capturingImplementationListeners; } else { if (bubblingImplementationListeners == null) { bubblingImplementationListeners = new HashTable(); } listeners = bubblingImplementationListeners; } EventListenerList list = (EventListenerList) listeners.get(type); if (list == null) { list = new EventListenerList(); listeners.put(type, list); } list.addListener(namespaceURI, null, listener); }
/** * Registers an event listener for the given namespaced event type * in the specified group. */ public void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object group) { HashTable listeners; if (useCapture) { if (capturingListeners == null) { capturingListeners = new HashTable(); } listeners = capturingListeners; } else { if (bubblingListeners == null) { bubblingListeners = new HashTable(); } listeners = bubblingListeners; } EventListenerList list = (EventListenerList) listeners.get(type); if (list == null) { list = new EventListenerList(); listeners.put(type, list); } list.addListener(namespaceURI, group, listener); }