/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { preInfo = new LinkedList(); namespaces = new HashTableStack(); namespaces.put("xml", XMLSupport.XML_NAMESPACE_URI); namespaces.put("xmlns", XMLSupport.XMLNS_NAMESPACE_URI); namespaces.put("", null); inDTD = false; inCDATA = false; inProlog = true; currentNode = null; document = null; doctype = null; isStandalone = false; xmlVersion = XMLConstants.XML_VERSION_10; stringBuffer.setLength(0); stringContent = false; if (createDocumentDescriptor) { documentDescriptor = new DocumentDescriptor(); } else { documentDescriptor = null; } }
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#endElement(String,String,String)}. */ public void endElement(String uri, String localName, String rawName) throws SAXException { appendStringData(); // add string data if any. if (currentNode != null) currentNode = currentNode.getParentNode(); namespaces.pop(); }
namespaces.push(); String version = null; for (int i = 0; i < len; i++) { if (ns.length() == 0) ns = null; namespaces.put("", ns); } else if (aname.charAt(5) == ':') { String ns = attributes.getValue(i); ns = null; namespaces.put(aname.substring(6), ns); ? "" : rawName.substring(0, idx); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); nsURI = (idx == -1) ? null : namespaces.get(aname.substring(0, idx)); e.setAttributeNS(nsURI, aname, attributes.getValue(i));
/** * Receive notification of the beginning of a document. * * @exception SAXException If this method was not called appropriately. */ public void startDocument() throws SAXException { try { // Create SVG Document String namespaceURI = SVGDOMImplementation.SVG_NAMESPACE_URI; super.document = implementation.createDocument(namespaceURI, "svg", null); super.startDocument(); // Add svg, and SVG_NAMESPACE to SAXDocumentFactory namespace handling. // This ties 'svg' prefix used above to the svg namespace uri. namespaces.put("svg", SVGDOMImplementation.SVG_NAMESPACE_URI); } catch (SAXException se) { throw se; } catch (Exception ex){ if (getLogger().isDebugEnabled()) { getLogger().debug("Got exception in startDocument, rethrowing", ex); } throw new SAXException("Exception in startDocument", ex); } }
? "" : lname.substring(0, idx); nsURI = namespaces.get(nsp); if (idx != -1 && idx != lname.length()-1) { lname = lname.substring(idx+1);
namespaces.push(); String version = null; for (int i = 0; i < len; i++) { if (ns.length() == 0) ns = null; namespaces.put("", ns); } else if (aname.charAt(5) == ':') { String ns = attributes.getValue(i); ns = null; namespaces.put(aname.substring(6), ns); ? "" : rawName.substring(0, idx); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); nsURI = (idx == -1) ? null : namespaces.get(aname.substring(0, idx)); e.setAttributeNS(nsURI, aname, attributes.getValue(i));
? "" : lname.substring(0, idx); nsURI = namespaces.get(nsp); if (idx != -1 && idx != lname.length()-1) { lname = lname.substring(idx+1);
namespaces.push(); String version = null; for (int i = 0; i < len; i++) { if (ns.length() == 0) ns = null; namespaces.put("", ns); } else if (aname.charAt(5) == ':') { String ns = attributes.getValue(i); ns = null; namespaces.put(aname.substring(6), ns); ? "" : rawName.substring(0, idx); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); nsURI = (idx == -1) ? null : namespaces.get(aname.substring(0, idx)); e.setAttributeNS(nsURI, aname, attributes.getValue(i));
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { preInfo = new LinkedList(); namespaces = new HashTableStack(); namespaces.put("xml", XMLSupport.XML_NAMESPACE_URI); namespaces.put("xmlns", XMLSupport.XMLNS_NAMESPACE_URI); namespaces.put("", null); inDTD = false; inCDATA = false; inProlog = true; currentNode = null; document = null; doctype = null; isStandalone = false; xmlVersion = XMLConstants.XML_VERSION_10; stringBuffer.setLength(0); stringContent = false; if (createDocumentDescriptor) { documentDescriptor = new DocumentDescriptor(); } else { documentDescriptor = null; } }
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#endElement(String,String,String)}. */ public void endElement(String uri, String localName, String rawName) throws SAXException { appendStringData(); // add string data if any. if (currentNode != null) currentNode = currentNode.getParentNode(); namespaces.pop(); }
? "" : lname.substring(0, idx); nsURI = namespaces.get(nsp); if (idx != -1 && idx != lname.length()-1) { lname = lname.substring(idx+1);
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { preInfo = new LinkedList(); namespaces = new HashTableStack(); namespaces.put("xml", XMLSupport.XML_NAMESPACE_URI); namespaces.put("xmlns", XMLSupport.XMLNS_NAMESPACE_URI); namespaces.put("", null); inDTD = false; inCDATA = false; inProlog = true; currentNode = null; document = null; doctype = null; isStandalone = false; xmlVersion = XMLConstants.XML_VERSION_10; stringBuffer.setLength(0); stringContent = false; if (createDocumentDescriptor) { documentDescriptor = new DocumentDescriptor(); } else { documentDescriptor = null; } }
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#endElement(String,String,String)}. */ public void endElement(String uri, String localName, String rawName) throws SAXException { appendStringData(); // add string data if any. if (currentNode != null) currentNode = currentNode.getParentNode(); namespaces.pop(); }