Re: INCLUDE/ IMPORT vs xmlns

In addition to Martin's answer, consider what will happen when somebody 
eventually (or now using attributes) tries to extend the schema language. 
You will have xmlns: namespace definitions for namespaces to be used in 
the schema document itself, and in the document to be validated.  "Import" 
tells the processor:  this namespace is for use in documents to be 
validated.  While you could assemble the information lazily at the time 
you saw the namespace being used for that purpose, we felt that explicitly 
declaring imported namespaces was generally good practice, and would be a 
big help to schema management tools.

Include has essential nothing to do with namespace declarations.  It is a 
way of combining definitions from multiple files.  As Martin points out, 
its semantics are NOT the same as textual inclusion, entity reference, 
XInclude, etc.  It is a semantic inclusion of definitions and 
declarations, not the souce that created those declarations.  If you 
compare Java's "import" to C #include, you will find that our include and 
import facilities are more in the spirit of the former.

Hope this helps.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







Andrei Astahov <AAstahov@hkw.co.uk>
Sent by: www-xml-schema-comments-request@w3.org
07/03/01 04:20 AM

 
        To:     "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        INCLUDE/ IMPORT  vs xmlns

What are  the advantages of using INCLUDE or IMPORT elements while the 
same
seemingly can be acheived by using xmlns attributes?

Received on Tuesday, 3 July 2001 08:42:37 UTC