public void switchSource(Source source, State newState) { String url = source.getSystemId(); if (url != null && sysIds.contains(url)) { return; } super.switchSource(source, newState); }
public void switchSource(Source source, State newState) { String url = source.getSystemId(); if (url != null && sysIds.contains(url)) { return; } super.switchSource(source, newState); }
public void switchSource(Source source, State newState) { String url = source.getSystemId(); if (url != null && sysIds.contains(url)) { return; } super.switchSource(source, newState); }
/** * Parse a schema supplied by a javax.xml.transform Source. * @param source */ public void parse(Source source) { reader.switchSource(source, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
/** * Parse a schema supplied by a javax.xml.transform Source. * @param source */ public void parse(Source source) { reader.switchSource(source, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
/** * Parses an additional schema. * * The caller can call this method many times to parse * multiple schemas. * * If possible, the caller should set the system Id to the InputSource. */ public void parse( InputSource is ) { reader.switchSource( is, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
/** * Parses an additional schema. * * The caller can call this method many times to parse * multiple schemas. * * If possible, the caller should set the system Id to the InputSource. */ public void parse( InputSource is ) { reader.switchSource( is, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
/** * Parses an additional schema. * * The caller can call this method many times to parse * multiple schemas. * * If possible, the caller should set the system Id to the InputSource. */ public void parse( InputSource is ) { reader.switchSource( is, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
/** * Parses an additional schema. * * The caller can call this method many times to parse * multiple schemas. * * If possible, the caller should set the system Id to the InputSource. */ public void parse( InputSource is ) { reader.switchSource( is, new RootIncludedSchemaState( reader.sfactory.schemaHead(null)) ); }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try { reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } } }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try { reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } } }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try { reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } } }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try {// parse included grammar first. reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } // disable duplicate definition check. prevDuplicateCheck = reader.doDuplicateDefinitionCheck; }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try { reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } } }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try {// parse included grammar first. reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } // disable duplicate definition check. prevDuplicateCheck = reader.doDuplicateDefinitionCheck; }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try {// parse included grammar first. reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } // disable duplicate definition check. prevDuplicateCheck = reader.doDuplicateDefinitionCheck; }
protected void startSelf() { final XMLSchemaReader reader = (XMLSchemaReader)this.reader; super.startSelf(); try {// parse included grammar first. reader.switchSource( this, new RootIncludedSchemaState( reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) ); } catch( AbortException e ) { // recover by ignoring the error } // disable duplicate definition check. prevDuplicateCheck = reader.doDuplicateDefinitionCheck; }
protected void switchSource( State sourceState, State newRootState ) throws AbortException { final String schemaLocation = sourceState.getStartTag().getAttribute("schemaLocation"); if(schemaLocation==null) { // schemaLocation attribute is required. reportError( ERR_MISSING_ATTRIBUTE, sourceState.getStartTag().qName, "schemaLocation" ); // recover by ignoring this element } else // parse specified file switchSource( sourceState, schemaLocation, newRootState ); }
protected void switchSource( State sourceState, State newRootState ) throws AbortException { final String schemaLocation = sourceState.getStartTag().getAttribute("schemaLocation"); if(schemaLocation==null) { // schemaLocation attribute is required. reportError( ERR_MISSING_ATTRIBUTE, sourceState.getStartTag().qName, "schemaLocation" ); // recover by ignoring this element } else // parse specified file switchSource( sourceState, schemaLocation, newRootState ); }
protected void startSelf() { super.startSelf(); final XMLSchemaReader reader = (XMLSchemaReader)this.reader; // TODO: @schemaLocation is optional. String namespace = startTag.getAttribute("namespace"); if( namespace==null ) namespace=""; if( namespace.equals(reader.currentSchema.targetNamespace) ) { reader.reportError( XMLSchemaReader.ERR_IMPORTING_SAME_NAMESPACE ); return; } if( reader.isSchemaDefined( reader.getOrCreateSchema(namespace) ) ) // this grammar is already defined. // so ignore it. return; try { reader.switchSource( this, new RootIncludedSchemaState(reader.sfactory.schemaHead(namespace)) ); } catch( AbortException e ) { // recover by ignoring the error } } }