xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Hao <mike_jj...@yahoo.com>
Subject Help with: org.xml.sax.SAXParseException: src-import.0: Failed to read imported schema document
Date Tue, 14 Sep 2004 21:26:08 GMT

Hi there,

I am trying to validate an XML document against a set of schemas. I have one master schema,
and in this schema, I imported other namespaces. When I tried to run my code, I got the warning
as shown in the subject line.

Following is my sample code for the validation, in whihc the method getSchemaURLs() was used
to get a File[] object of schema files on my local machine.

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", getSchemaURLs());
builder = factory.newDocumentBuilder();
Can anyone tell me what's the reason for this warning? How can I avoid such warnings?

Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
View raw message