public NamespaceContextImpl(NamespacePrefixMapper _prefixMapper) { this.prefixMapper = _prefixMapper; // declare the default namespace binding // which are effective because of the way XML1.0 is made nss.declarePrefix("",""); nss.declarePrefix( "xmlns", XMLConstants.XMLNS_ATTRIBUTE_NS_URI ); // this one is taken care of by the NamespaceSupport class by default. // nss.declarePrefix( "xml", XMLConstants.XML_NS_URI ); }
public NamespaceContextImpl(NamespacePrefixMapper _prefixMapper) { this.prefixMapper = _prefixMapper; // declare the default namespace binding // which are effective because of the way XML1.0 is made nss.declarePrefix("",""); nss.declarePrefix( "xmlns", XMLConstants.XMLNS_ATTRIBUTE_NS_URI ); // this one is taken care of by the NamespaceSupport class by default. // nss.declarePrefix( "xml", XMLConstants.XML_NS_URI ); }
public NamespaceContextImpl(NamespacePrefixMapper _prefixMapper) { this.prefixMapper = _prefixMapper; // declare the default namespace binding // which are effective because of the way XML1.0 is made nss.declarePrefix("",""); nss.declarePrefix( "xmlns", XMLConstants.XMLNS_ATTRIBUTE_NS_URI ); // this one is taken care of by the NamespaceSupport class by default. // nss.declarePrefix( "xml", XMLConstants.XML_NS_URI ); }
public NamespaceContextImpl(NamespacePrefixMapper _prefixMapper) { this.prefixMapper = _prefixMapper; // declare the default namespace binding // which are effective because of the way XML1.0 is made nss.declarePrefix("",""); nss.declarePrefix( "xmlns", XMLConstants.XMLNS_ATTRIBUTE_NS_URI ); // this one is taken care of by the NamespaceSupport class by default. // nss.declarePrefix( "xml", XMLConstants.XML_NS_URI ); }
/** * Reconciles the namespace URI/prefix mapping requests since the * last startElement method invocation and finalizes them. * * This method must be called after all the necessary namespace URIs * for this element is reported through the declareNamespace method * or the getPrefix method. */ public void endNamespaceDecls() { if(!decls.isEmpty()) { // most of the times decls is empty, so take advantage of it. for( Iterator itr=decls.entrySet().iterator(); itr.hasNext(); ) { Map.Entry e = (Map.Entry)itr.next(); String prefix = (String)e.getKey(); String uri = (String)e.getValue(); if(!uri.equals(nss.getURI(prefix))) // avoid redundant decls. nss.declarePrefix( prefix, uri ); } decls.clear(); reverseDecls.clear(); } inCollectingMode = false; }
/** * Reconciles the namespace URI/prefix mapping requests since the * last startElement method invocation and finalizes them. * * This method must be called after all the necessary namespace URIs * for this element is reported through the declareNamespace method * or the getPrefix method. */ public void endNamespaceDecls() { if(!decls.isEmpty()) { // most of the times decls is empty, so take advantage of it. for( Iterator itr=decls.entrySet().iterator(); itr.hasNext(); ) { Map.Entry e = (Map.Entry)itr.next(); String prefix = (String)e.getKey(); String uri = (String)e.getValue(); if(!uri.equals(nss.getURI(prefix))) // avoid redundant decls. nss.declarePrefix( prefix, uri ); } decls.clear(); reverseDecls.clear(); } inCollectingMode = false; }
/** * Reconciles the namespace URI/prefix mapping requests since the * last startElement method invocation and finalizes them. * * This method must be called after all the necessary namespace URIs * for this element is reported through the declareNamespace method * or the getPrefix method. */ public void endNamespaceDecls() { if(!decls.isEmpty()) { // most of the times decls is empty, so take advantage of it. for( Iterator itr=decls.entrySet().iterator(); itr.hasNext(); ) { Map.Entry e = (Map.Entry)itr.next(); String prefix = (String)e.getKey(); String uri = (String)e.getValue(); if(!uri.equals(nss.getURI(prefix))) // avoid redundant decls. nss.declarePrefix( prefix, uri ); } decls.clear(); reverseDecls.clear(); } inCollectingMode = false; }
/** * Reconciles the namespace URI/prefix mapping requests since the * last startElement method invocation and finalizes them. * * This method must be called after all the necessary namespace URIs * for this element is reported through the declareNamespace method * or the getPrefix method. */ public void endNamespaceDecls() { if(!decls.isEmpty()) { // most of the times decls is empty, so take advantage of it. for( Iterator itr=decls.entrySet().iterator(); itr.hasNext(); ) { Map.Entry e = (Map.Entry)itr.next(); String prefix = (String)e.getKey(); String uri = (String)e.getValue(); if(!uri.equals(nss.getURI(prefix))) // avoid redundant decls. nss.declarePrefix( prefix, uri ); } decls.clear(); reverseDecls.clear(); } inCollectingMode = false; }