Neil, Thanks for the suggestion. I'm trying to stick to generally supported, standard usage - if that means using absolute paths to locate Schemas, then I'll use absolute paths. This should only be a problem while I'm developing the schemas, anyway - Eventually schema locations will be "http://..."
John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 5:32 PM To: [EMAIL PROTECTED] Subject: Re: Relative paths in SchemaLocation and Import Hi John, The only thing you can do if the way Xerces does Entity resolution doesn't work for you--and it may well not work for you, it certainly can't work for everyone :-)--is to create your own EntityResolver and register it with your parser. Look at the docs for the org.xml.sax.EntityResolver interface for details on how this works; it's really not that hard. Hope that helps, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 416-448-3519, T/L 778-3519 E-mail: [EMAIL PROTECTED] "John Powell" <[EMAIL PROTECTED]> on 08/30/2001 11:41:27 AM Please respond to [EMAIL PROTECTED] To: "Xerces-J-User" <[EMAIL PROTECTED]> cc: Subject: Relative paths in SchemaLocation and Import Hi, I need to have one schema import another one, but I don't want to use an absolute path in the import. I have <xsd:import namespace="http://www.ara.com/base" schemaLocation="base.xsd"/> in another schema named ext.xsd. Both schemas are in a folder called D:\Schemas and my instance files are in a folder called D:\Instances. When I validate an instance using xerces v1.4.3, I get a fatal error stating file:///D:/instances/base.xsd not found. Is there a way to indicate that the schema should be relative to the importing schema rather than the instance file? John --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
