you can use an alternate EntityResolver.

for an example check out:
http://daitss.fcla.edu/browser/xmlvalidator/trunk

it can be checked out via:

svn co http://daitss.fcla.edu/repos/xmlvalidator/trunk/

its a validator that can use a filesystem based cache with temporal
expiration. its straightforwardd code. no external jars.

and if you want to use the code, its GPL.

-franco

On Mon, Sep 17, 2007 at 04:26:28PM -0400, Jing Yang wrote:
> www.w3.org  block my accessing  due to re-questing files too often.  
> 
> I found  one   importing schema was  <xsd:import
> namespace="http://www.w3.org/XML/1998/namespace";
> schemaLocation="http://www.w3.org/2001/xml.xsd"/>
> 
>  
> 
> Does XSLoader provide the mechanism to avoid  repeated loading  schema
> during high capacity volume process ?
> 
> How to work with this issue ? The Xerces  is 2_9_0. The code is as below: 
> 
>  
> 
> System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom
> .DOMXSImplementationSourceImpl");
> 
> DOMImplementationRegistry registry =
> DOMImplementationRegistry.newInstance();
> 
> XSImplementation impl = (XSImplementation)
> registry.getDOMImplementation("XS-Loader");
> 
> XSLoader schemaLoader = impl.createXSLoader(null);
> 
> DOMConfiguration config = schemaLoader.getConfig();
> 
> // set error handler
> 
> config.setParameter("error-handler", this);
> 
> // set validation feature
> 
> config.setParameter("validate", Boolean.TRUE);
> 
> //    parse document
> 
> XSModel model = schemaLoader.loadURI(schemaURL);
> 

-- 
Francesco Lazzarino
Digital Archive Programmer
Florida Center for Library Automation
http://daitss.fcla.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to