include the same schema file more than once

Suppose an XML Schema uses <xs:include> to include other schema files.
(These in turn may also include schema files.)
As a result, some schema files might be included more than once. 

Q1. Is this valid according to the XML Schema specification?

I note that the xsv tool reports all includes of a file after the first
one as "redundant", e.g. 
it produces messages such as:

  <schemaDocAttempt URI="file:///C:/.../CommonTypes.xsd"
    namespace="..."
                    outcome="success" source="include"/>
...
  <schemaDocAttempt URI="file:///C:/.../CommonTypes.xsd"
    namespace="..."
                    outcome="redundant" source="include"/>
  <schemaDocAttempt URI="file:///C:/.../CommonTypes.xsd"
    namespace="..."
                    outcome="redundant" source="include"/>


Unfortunately some tools have an actual problem with redundant includes,

including xsd.exe from Microsoft.

Q2. Is this some kind of non-compliance with the XML Schema spec?
Or is it handled in a different way e.g. by some WS-I spec?

Q3. Is anyone aware of a tool that will "expand" a schema?
This tool would process all the include (and ideally also import)
statements in a schema, 
producing a single schema file as output that has no redundant includes 
and no redundant type definitions.

Thanks,
Steve
-- 
Steve Tolkin    Steve . Tolkin at FMR dot COM   617-563-0516 
Fidelity Investments   82 Devonshire St. V4D     Boston MA 02109
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.

Received on Friday, 16 July 2004 16:58:43 UTC