private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException { // if feature secure processing enabled, nothing to do, file is allowed, // or user is able to control access by standard JAXP mechanisms if (disableSecureProcessing) { return saxParser; } try { saxParser.setProperty(ACCESS_EXTERNAL_SCHEMA, "file"); LOGGER.log(Level.FINE, Messages.format(Messages.JAXP_SUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA)); } catch (SAXException ignored) { // nothing to do; support depends on version JDK or SAX implementation LOGGER.log(Level.CONFIG, Messages.format(Messages.JAXP_UNSUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA), ignored); } return saxParser; }
private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException { // if feature secure processing enabled, nothing to do, file is allowed, // or user is able to control access by standard JAXP mechanisms if (disableSecureProcessing) { return saxParser; } try { saxParser.setProperty(ACCESS_EXTERNAL_SCHEMA, "file"); LOGGER.log(Level.FINE, Messages.format(Messages.JAXP_SUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA)); } catch (SAXException ignored) { // nothing to do; support depends on version JDK or SAX implementation LOGGER.log(Level.CONFIG, Messages.format(Messages.JAXP_UNSUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA), ignored); } return saxParser; }
private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException { // if feature secure processing enabled, nothing to do, file is allowed, // or user is able to control access by standard JAXP mechanisms if (disableSecureProcessing) { return saxParser; } try { saxParser.setProperty(ACCESS_EXTERNAL_SCHEMA, "file"); LOGGER.log(Level.FINE, Messages.format(Messages.JAXP_SUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA)); } catch (SAXException ignored) { // nothing to do; support depends on version JDK or SAX implementation LOGGER.log(Level.CONFIG, Messages.format(Messages.JAXP_UNSUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA), ignored); } return saxParser; }
private void resolve() throws SAXException { ref = resolveReference(name); if(ref==null) manager.reportError( Messages.format(getErrorProperty(),name.getQualifiedName()), source ); }
private void resolve() throws SAXException { ref = resolveReference(name); if(ref==null) manager.reportError( Messages.format(getErrorProperty(),name.getQualifiedName()), source ); }
private void resolve() throws SAXException { ref = resolveReference(name); if(ref==null) manager.reportError( Messages.format(getErrorProperty(),name.getQualifiedName()), source ); }
private void resolve() throws SAXException { ref = resolveReference(name); if(ref==null) manager.reportError( Messages.format(getErrorProperty(),name.getQualifiedName()), source ); }
private void resolve() throws SAXException { ref = resolveReference(name); if(ref==null) manager.reportError( Messages.format(getErrorProperty(),name.getQualifiedName()), source ); }
/** Includes the specified schema. */ public void includeSchema( String schemaLocation ) throws SAXException { NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this); runtime.currentSchema = this.currentSchema; runtime.blockDefault = this.blockDefault; runtime.finalDefault = this.finalDefault; if( schemaLocation==null ) { SAXParseException e = new SAXParseException( Messages.format( Messages.ERR_MISSING_SCHEMALOCATION ), getLocator() ); parser.errorHandler.fatalError(e); throw e; } runtime.parseEntity( resolveRelativeURL(null,schemaLocation), true, currentSchema.getTargetNamespace(), getLocator() ); }
/** Includes the specified schema. */ public void includeSchema( String schemaLocation ) throws SAXException { NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this); runtime.currentSchema = this.currentSchema; runtime.blockDefault = this.blockDefault; runtime.finalDefault = this.finalDefault; if( schemaLocation==null ) { SAXParseException e = new SAXParseException( Messages.format( Messages.ERR_MISSING_SCHEMALOCATION ), getLocator() ); parser.errorHandler.fatalError(e); throw e; } runtime.parseEntity( resolveRelativeURL(null,schemaLocation), true, currentSchema.getTargetNamespace(), getLocator() ); }
private void action0()throws SAXException { XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName()); if(oldAg==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP,newAg.getName()) ); } else { newAg.redefine((AttGroupDeclImpl)oldAg); $runtime.currentSchema.addAttGroupDecl(newAg,true); } }
private void action1()throws SAXException { XSModelGroupDecl oldGrp = $runtime.currentSchema.getModelGroupDecl(newGrp.getName()); if(oldGrp==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_MODELGROUP,newGrp.getName()) ); } else { newGrp.redefine((ModelGroupDeclImpl)oldGrp); $runtime.currentSchema.addModelGroupDecl(newGrp,true); } }
private void action0()throws SAXException { XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName()); if(oldAg==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP,newAg.getName()) ); } else { newAg.redefine((AttGroupDeclImpl)oldAg); $runtime.currentSchema.addAttGroupDecl(newAg,true); } }
private void action0()throws SAXException { XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName()); if(oldAg==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP,newAg.getName()) ); } else { newAg.redefine((AttGroupDeclImpl)oldAg); $runtime.currentSchema.addAttGroupDecl(newAg,true); } }
private void action0()throws SAXException { XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName()); if(oldAg==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP,newAg.getName()) ); } else { newAg.redefine((AttGroupDeclImpl)oldAg); $runtime.currentSchema.addAttGroupDecl(newAg,true); } }