Import Vs. Include.

Hi
In my current csco_md_... xmlschema I have referenced another schema (the
ims schema) in the following way

   <xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema
            targetNamespace=”
http://www.cisco.com/elearning/xsd/ciscomd_v001”
            xmlns=http://www.cisco.com/elearning/xsd/ciscomd_v001
            elementFormDefault=”qualified” version="csco_elearning Version
0.0.1">

            <xsd:import
namespace="http://www.imsglobal.org/xsd/imsmd_rootv1p2p2"
                                schemaLocation="imsmd_rootv1p2p2.xsd"/>


However, I read in documentation that I am supposed to do it differently.
That document says:
•       The include element allows you to access components in other schemas
-    All the schemas you include must have the same namespace as your schema
(i.e., the schema that is doing the include)
-   The net effect of include is as though you had typed all the definitions
directly into the containing schema

and gives the following example:
<xsd:schema …>
    <xsd:include schemaLocation="LibraryBook.xsd"/>
    <xsd:include schemaLocation="LibraryEmployee.xsd"/>
    …
</xsd:schema>


Which is right?  How should I include/import the ims schema, and what's the
difference between the way I did it and they did it?
Thanks.
Sunil

Received on Tuesday, 18 June 2002 10:37:55 UTC