/** * Finds all {@link XSDSchemaLocationResolver}'s used by the configuration. * * @param configuration The parser configuration. * * @return A list of location resolvers, empty if none found. */ public static List findSchemaLocationResolvers( Configuration configuration ) { List all = configuration.allDependencies(); List resolvers = new ArrayList(); for ( Iterator c = all.iterator(); c.hasNext(); ) { configuration = (Configuration) c.next(); XSDSchemaLocationResolver resolver = configuration.getSchemaLocationResolver(); if ( resolver != null ) { resolvers.add( resolver ); } } return resolvers; }
/** * Finds all {@link XSDSchemaLocationResolver}'s used by the configuration. * * @param configuration The parser configuration. * * @return A list of location resolvers, empty if none found. */ public static List findSchemaLocationResolvers(Configuration configuration) { List all = configuration.allDependencies(); List resolvers = new ArrayList(); for (Iterator c = all.iterator(); c.hasNext();) { configuration = (Configuration) c.next(); XSDSchemaLocationResolver resolver = configuration.getSchemaLocationResolver(); if (resolver != null) { resolvers.add(resolver); } } return resolvers; }
/** * Finds all {@link XSDSchemaLocationResolver}'s used by the configuration. * * @param configuration The parser configuration. * * @return A list of location resolvers, empty if none found. */ public static List findSchemaLocationResolvers(Configuration configuration) { List all = configuration.allDependencies(); List resolvers = new ArrayList(); for (Iterator c = all.iterator(); c.hasNext();) { configuration = (Configuration) c.next(); XSDSchemaLocationResolver resolver = configuration.getSchemaLocationResolver(); if (resolver != null) { resolvers.add(resolver); } } return resolvers; }
/** * Template method for creating the schema instance from the xml configuration. * <p> * Subclasses may with to override or exten this method. The default implementation * uses {@link Configuration#getSchemaFileURL()} and {@link Configuration#getSchemaLocationResolver()} * to parse the schema directly. * </p> * * @return The created schema. * * @throws Exception Any errors that occur while parsing the schema. */ protected XSDSchema createSchema() throws Exception { //add dependent location resolvers List resolvers = new ArrayList(); for ( Iterator d = configuration.allDependencies().iterator(); d.hasNext(); ) { Configuration dependency = (Configuration) d.next(); XSDSchemaLocationResolver resolver = dependency.getSchemaLocationResolver(); if ( resolver != null) { resolvers.add( resolver ); } } String location = configuration.getSchemaFileURL().toString(); if(logger.isLoggable(Level.FINE)) logger.fine("parsing schema " + configuration.getNamespaceURI() ); return Schemas.parse( location, null, resolvers ); } }
XSDSchemaLocationResolver resolver = dependency.getSchemaLocationResolver() ; if ( resolver != null ) { QName key = new QName( dependency.getNamespaceURI(), "schemaLocationResolver" );
XSDSchemaLocationResolver resolver = dependency.getSchemaLocationResolver();
XSDSchemaLocationResolver resolver = dependency.getSchemaLocationResolver();