Probably xerces proceeds like this:
Xerces must be able to directly locate the schema for the namespace of the
root element. It does not read schema#1 (for a seemingly irrelevant
namespace) in the hopes of finding the location of schema#2. If schema #1
is in the schemaLocation attribute of the instance document, it should work.
You can include both schemas there if you choose.
This is not redundant with the import element in schema#1. That import is
required in order to make it legal to refer in schema#1 to items from
schema#2.
Jeff
----- Original Message -----
From: "Adachi Seiichi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 1:39 AM
Subject: Schema validation using multiple schemas
> Hi All,
>
> I am trying to validate an xml file using multiple schema files using
> Xerces-J 2.5.0. The xml file specifies the location of schema#1 using
> schemaLocation. Inside of schema#1, schema#2 is specified using
> xsd:import. I get an error when the root element of the xml file is an
> element defined in schema#2.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]