For IntelliJ IDEA,
Android Studio or Eclipse



public void startElement(String s, String s1, String s2, Attributes attributes) throws SAXException { if(namespaceToIgnore.equals(s)) return; IslandSchema islandschema = dispatcher.getSchemaProvider().getSchemaByNamespace(s); if(islandschema == null) { return; } else { IslandVerifier islandverifier = islandschema.createNewVerifier(s, islandschema.getElementDecls()); dispatcher.switchVerifier(islandverifier); islandverifier.startElement(s, s1, s2, attributes); return; } }
public void skippedEntity( String name ) throws SAXException { currentHandler.skippedEntity(name); }
public void characters (char ch[], int start, int length) throws SAXException { currentHandler.characters(ch, start, length); }
public void processingInstruction (String target, String data) throws SAXException { currentHandler.processingInstruction (target, data); }
public void ignorableWhitespace (char ch[], int start, int length) throws SAXException { currentHandler.ignorableWhitespace(ch, start, length); }
public void setDocumentLocator( Locator locator ) { documentLocator = locator; currentHandler.setDocumentLocator(locator); }
public void endPrefixMapping(String prefix) throws SAXException { currentHandler.endPrefixMapping(prefix); } }
public DispatcherImpl( SchemaProvider schema ) { this.schema = schema; this.transponder = new Transponder(); this.currentHandler = schema.createTopLevelVerifier(); this.currentHandler.setDispatcher(this); }
public void startElement( String uri, String localName, String qName, Attributes attributes ) throws SAXException { currentHandler.startElement(uri,localName,qName,attributes); depth++; nsMap.pushContext(); }
public void startPrefixMapping(String prefix,String uri) throws SAXException { nsMap.declarePrefix(prefix,uri); currentHandler.startPrefixMapping(prefix,uri); } public void endPrefixMapping(String prefix)
public void unparsedEntityDecl( String name, String systemId, String publicId, String notation ) {// memorize unparsedEntityDecl unparsedEntityDecls.add( new UnparsedEntityDecl(name,systemId,publicId,notation) ); } public void notationDecl( String name, String systemId, String publicId )
public void fatalError( SAXParseException error ) throws SAXException { core.getErrorHandler().fatalError( error ); } public void error( SAXParseException error ) throws SAXException {
/** * switch to another IslandVerifier to validate anyOtherElement. */ protected void switchToAnyOtherElement( AnyOtherElementExp[] exps, String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { // memorize AnyOtherElementExps to the map for( int i=0; i<exps.length; i++ ) rule2exp.put( exps[i], exps[i] ); IslandVerifier iv = new AnyOtherElementVerifier(exps); dispatcher.switchVerifier(iv); // remember tag names (these will be used in endChildIsland method) lastNamaespaceUri = namespaceUri; lastLocalName = localName; lastQName = qName; // simulate this startElement event iv.startElement( namespaceUri, localName, qName, atts ); }
public void fatalError( SAXParseException error ) throws SAXException { core.getErrorHandler().fatalError( error ); } public void error( SAXParseException error ) throws SAXException {
/** * switch to another IslandVerifier to validate anyOtherElement. */ protected void switchToAnyOtherElement( AnyOtherElementExp[] exps, String namespaceUri, String localName, String qName, Attributes atts ) throws SAXException { // memorize AnyOtherElementExps to the map for( int i=0; i<exps.length; i++ ) rule2exp.put( exps[i], exps[i] ); IslandVerifier iv = new AnyOtherElementVerifier(exps); dispatcher.switchVerifier(iv); // remember tag names (these will be used in endChildIsland method) lastNamaespaceUri = namespaceUri; lastLocalName = localName; lastQName = qName; // simulate this startElement event iv.startElement( namespaceUri, localName, qName, atts ); }