/** * Recursively visit ancestors and build up {@link NamespaceSupport} oject. */ private void buildNamespaceSupport(NamespaceSupport nss, Node node) { if(node==null || node.getNodeType()!=Node.ELEMENT_NODE) return; buildNamespaceSupport( nss, node.getParentNode() ); nss.pushContext(); NamedNodeMap atts = node.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)atts.item(i); if( "xmlns".equals(a.getPrefix()) ) { nss.declarePrefix( a.getLocalName(), a.getValue() ); continue; } if( "xmlns".equals(a.getName()) ) { nss.declarePrefix( "", a.getValue() ); continue; } } }
nsSupport.pushContext(); int length = qAtts.getLength();
nssupport.pushContext();
nssupport.pushContext();
/** * Recursively visit ancestors and build up {@link NamespaceSupport} oject. */ private void buildNamespaceSupport(NamespaceSupport nss, Node node) { if(node==null || node.getNodeType()!=Node.ELEMENT_NODE) return; buildNamespaceSupport( nss, node.getParentNode() ); nss.pushContext(); NamedNodeMap atts = node.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)atts.item(i); if( "xmlns".equals(a.getPrefix()) ) { nss.declarePrefix( a.getLocalName(), a.getValue() ); continue; } if( "xmlns".equals(a.getName()) ) { nss.declarePrefix( "", a.getValue() ); continue; } } }
throws SAXException { nsContext.pushContext();
this.namespaces.pushContext();
public void startElement( String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { if( !contextPushed ) namespaceSupport.pushContext(); contextPushed = false; }
public void startElement( String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { if( !contextPushed ) namespaceSupport.pushContext(); contextPushed = false; }
public void startElement( String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { if( !contextPushed ) namespaceSupport.pushContext(); contextPushed = false; }
public void startElement( String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { if( !contextPushed ) namespaceSupport.pushContext(); contextPushed = false; }
public void startPrefixMapping( String prefix, String uri ) { if( !contextPushed ) { namespaceSupport.pushContext(); contextPushed = true; } namespaceSupport.declarePrefix( prefix, uri ); } public void endPrefixMapping( String prefix ) {}
public void startPrefixMapping( String prefix, String uri ) { if( !contextPushed ) { namespaceSupport.pushContext(); contextPushed = true; } namespaceSupport.declarePrefix( prefix, uri ); } public void endPrefixMapping( String prefix ) {}
public void startElement (final String uri, final String localName, final String qName, final Attributes attributes) throws SAXException { currentHandler.startElement (uri, localName, qName, attributes); depth++; nsMap.pushContext (); }
public void startPrefixMapping( String prefix, String uri ) { if( !contextPushed ) { namespaceSupport.pushContext(); contextPushed = true; } namespaceSupport.declarePrefix( prefix, uri ); } public void endPrefixMapping( String prefix ) {}
public void startElement( String uri, String localName, String qName, Attributes attributes ) throws SAXException { currentHandler.startElement(uri,localName,qName,attributes); depth++; nsMap.pushContext(); }
@Override public void startPrefixMapping(String prefix, String uri) throws SAXException { if (WellKnownNamespace.XML_NAMESPACE_URI.equals(uri)) return; super.startPrefixMapping(prefix, uri); //xml prefix shall not be declared based on jdk api javado nsSupport.pushContext(); nsSupport.declarePrefix(prefix,uri); }
@Override public void startPrefixMapping(String prefix, String uri) throws SAXException { if (WellKnownNamespace.XML_NAMESPACE_URI.equals(uri)) return; super.startPrefixMapping(prefix, uri); //xml prefix shall not be declared based on jdk api javado nsSupport.pushContext(); nsSupport.declarePrefix(prefix,uri); }
public void startPrefixMapping(String prefix, String uri) throws SAXException { super.startPrefixMapping(prefix, uri); nsSupport.pushContext(); nsSupport.declarePrefix(prefix,uri); }
@Override public void startPrefixMapping(String prefix, String uri) throws SAXException { reportedNS.pushContext(); if (getReportedPrefix(uri) == null) reportedNS.declarePrefix(prefix, uri); }