I have posted a similar question to the forum and I am still
experiencing this problem with
Xerces-J 1.4.4.  I am trying to use the setProperty method to set the
schema location for
our parser to used during the validation process:

DOMParser parser = new DOMParser();
parser.setFeature( "http://xml.org/sax/features/validation";, true );
parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion";,
false );
parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error";,
true );
parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation";,


"http://www.imsglobal.org/xsd/imsmd_rootv1p2p1
md_test\\imsmd_rootv1p2p1.xsd");

My Parser is use inside of a Java Applet.  And for some reason, which I
cannot seem to track down, the parser
thinks that the XSD that I want to use for validation
(imsmd_rootv1p2p1.xsd) is located on my Desktop.  The
following error is presented in the Java Console:

Property: http://www.imsglobal.org/xsd/imsmd_rootv1p2p1
md_test\imsmd_rootv1p2p1.xsd
[Error] :0:0: File
"file:///C:/WINNT/Profiles/thropps.000/Desktop/md_test/imsmd_rootv1p2p1.xsd"
not found.
java.io.FileNotFoundException:
C:\WINNT\Profiles\thropps.000\Desktop\md_test\imsmd_rootv1p2p1.xsd (The
system cannot find the path specified)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.<init>(Unknown Source)
 at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
 at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
Source)
 at java.net.URL.openStream(Unknown Source)
 at
org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:149)

 at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:493)

 at
org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)

 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
 at
org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar(XMLValidator.java:2823)

 at
org.apache.xerces.validators.common.XMLValidator.parseSchemas(XMLValidator.java:2747)

 at
org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElementAndAttributes(XMLValidator.java:2628)

 at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1218)

 at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)

 at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:949)

 at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
 at
org.adl.tsuite.metadata.MetaDataDOMParser.validate(MetaDataDOMParser.java:436)

 at
org.adl.tsuite.metadata.MetaDataDriver.startValidateTest(MetaDataDriver.java:550)

Has anyone else experienced this?  Why does it always assume the XSD is
located on my Desktop when I specifically told the parser which one to
use via the setProperty()?

Any help would be appreciated.
Thanks


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

Reply via email to