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; } }
/** * creates a choice expression of all exported rules in the given provider. * * this expression is used as a pseudo content model of anyOtherElement. */ private Expression createChoiceOfAllExportedRules( SchemaProvider provider ) { Expression exp = Expression.nullSet; Iterator itr = provider.iterateNamespace(); while( itr.hasNext() ) { String namespace = (String)itr.next(); IslandSchema is = provider.getSchemaByNamespace(namespace); ElementDecl[] rules = is.getElementDecls(); for( int j=0; j<rules.length; j++ ) exp = module.pool.createChoice(exp, new ExternalElementExp(module.pool,namespace,rules[j].getName(),null)); } return exp; } }
/** * creates a choice expression of all exported rules in the given provider. * * this expression is used as a pseudo content model of anyOtherElement. */ private Expression createChoiceOfAllExportedRules( SchemaProvider provider ) { Expression exp = Expression.nullSet; Iterator itr = provider.iterateNamespace(); while( itr.hasNext() ) { String namespace = (String)itr.next(); IslandSchema is = provider.getSchemaByNamespace(namespace); ElementDecl[] rules = is.getElementDecls(); for( int j=0; j<rules.length; j++ ) exp = module.pool.createChoice(exp, new ExternalElementExp(module.pool,namespace,rules[j].getName(),null)); } return exp; } }
/** * creates a choice expression of all exported rules in the given provider. * * this expression is used as a pseudo content model of anyOtherElement. */ private Expression createChoiceOfAllExportedRules( SchemaProvider provider ) { Expression exp = Expression.nullSet; Iterator<?> itr = provider.iterateNamespace(); while( itr.hasNext() ) { String namespace = (String)itr.next(); IslandSchema is = provider.getSchemaByNamespace(namespace); ElementDecl[] rules = is.getElementDecls(); for( int j=0; j<rules.length; j++ ) exp = module.pool.createChoice(exp, new ExternalElementExp(module.pool,namespace,rules[j].getName(),null)); } return exp; } }
/** * creates a choice expression of all exported rules in the given provider. * * this expression is used as a pseudo content model of anyOtherElement. */ private Expression createChoiceOfAllExportedRules( SchemaProvider provider ) { Expression exp = Expression.nullSet; Iterator itr = provider.iterateNamespace(); while( itr.hasNext() ) { String namespace = (String)itr.next(); IslandSchema is = provider.getSchemaByNamespace(namespace); ElementDecl[] rules = is.getElementDecls(); for( int j=0; j<rules.length; j++ ) exp = module.pool.createChoice(exp, new ExternalElementExp(module.pool,namespace,rules[j].getName(),null)); } return exp; } }
public void startElement( String namespaceURI, String localName, String qName, Attributes attributes ) throws SAXException { if( namespaceToIgnore.equals(namespaceURI) ) return; // this element is "validated". // try to locate a grammar of this namespace IslandSchema is = dispatcher.getSchemaProvider().getSchemaByNamespace(namespaceURI); if( is==null ) {// no grammar is declared with this namespace URI. return; // continue ignoring. } // a schema is found: revert to normal mode and validate them. IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() ); dispatcher.switchVerifier(iv); // simulate this startElement method. iv.startElement(namespaceURI,localName,qName,attributes); } }
@Override public void startElement (final String namespaceURI, final String localName, final String qName, final Attributes attributes) throws SAXException { if (namespaceToIgnore.equals (namespaceURI)) return; // this element is "validated". // try to locate a grammar of this namespace final IslandSchema is = dispatcher.getSchemaProvider ().getSchemaByNamespace (namespaceURI); if (is == null) {// no grammar is declared with this namespace URI. return; // continue ignoring. } // a schema is found: revert to normal mode and validate them. final IslandVerifier iv = is.createNewVerifier (namespaceURI, is.getElementDecls ()); dispatcher.switchVerifier (iv); // simulate this startElement method. iv.startElement (namespaceURI, localName, qName, attributes); } }
@Override public void startElement (final String namespaceURI, final String localName, final String qName, final Attributes attributes) throws SAXException { if (namespaceToIgnore.equals (namespaceURI)) return; // this element is "validated". // try to locate a grammar of this namespace final IslandSchema is = dispatcher.getSchemaProvider ().getSchemaByNamespace (namespaceURI); if (is == null) {// no grammar is declared with this namespace URI. return; // continue ignoring. } // a schema is found: revert to normal mode and validate them. final IslandVerifier iv = is.createNewVerifier (namespaceURI, is.getElementDecls ()); dispatcher.switchVerifier (iv); // simulate this startElement method. iv.startElement (namespaceURI, localName, qName, attributes); } }
IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() ); dispatcher.switchVerifier(iv); iv.startElement(namespaceURI,localName,qName,atts);
IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() ); dispatcher.switchVerifier(iv); iv.startElement(namespaceURI,localName,qName,atts);
IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() ); dispatcher.switchVerifier(iv); iv.startElement(namespaceURI,localName,qName,atts);
IslandVerifier iv = is.createNewVerifier( namespaceURI, is.getElementDecls() ); dispatcher.switchVerifier(iv); iv.startElement(namespaceURI,localName,qName,atts);