/** Empty element. */ public void emptyElement(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { // bind namespaces, if needed if (fNamespaces) { fNamespaceContext.pushContext(); bindNamespaces(element, attrs); int dcount = fNamespaceContext.getDeclaredPrefixCount(); if (fDocumentHandler != null && dcount > 0) { for (int i = 0; i < dcount; i++) { String prefix = fNamespaceContext.getDeclaredPrefixAt(i); String uri = fNamespaceContext.getURI(prefix); XercesBridge.getInstance() .XMLDocumentHandler_startPrefixMapping(fDocumentHandler, prefix, uri, augs); } } } // perform default handling super.emptyElement(element, attrs, augs); // pop context if (fNamespaces) { int dcount = fNamespaceContext.getDeclaredPrefixCount(); if (fDocumentHandler != null && dcount > 0) { for (int i = dcount - 1; i >= 0; i--) { String prefix = fNamespaceContext.getDeclaredPrefixAt(i); XercesBridge.getInstance() .XMLDocumentHandler_endPrefixMapping(fDocumentHandler, prefix, augs); } } fNamespaceContext.popContext(); } } // startElement(QName,XMLAttributes,Augmentations)
/** End element. */ public void endElement(QName element, Augmentations augs) throws XNIException { // bind namespaces, if needed if (fNamespaces) { bindNamespaces(element, null); } // perform default handling super.endElement(element, augs); // pop context if (fNamespaces) { int dcount = fNamespaceContext.getDeclaredPrefixCount(); if (fDocumentHandler != null && dcount > 0) { for (int i = dcount - 1; i >= 0; i--) { String prefix = fNamespaceContext.getDeclaredPrefixAt(i); XercesBridge.getInstance() .XMLDocumentHandler_endPrefixMapping(fDocumentHandler, prefix, augs); } } fNamespaceContext.popContext(); } } // endElement(QName,Augmentations)