W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2004

include the same schema file more than once

From: Tolkin, Steve <Steve.Tolkin@FMR.COM>
Date: Fri, 16 Jul 2004 16:58:10 -0400
Message-ID: <176FDD8DC56B4946946917ECEBA4DA5501DE94A7@MSGBOSCLA2WIN.DMN1.FMR.COM>
To: <xmlschema-dev@w3.org>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:10 UTC