[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Multiple and circular import/include

From: Bob Schloss <rschloss@us.ibm.com>
Date: Tue, 1 Mar 2005 15:17:04 -0500
To: vivek agarwal <vivekorama@gmail.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OFAB49F6CF.A3DF33A0-ON85256FB7.006EC01A-85256FB7.006F6D26@us.ibm.com>
xml schema import circular





Vivek,

      It is not an error to include the same schema document as the target
of multiple <include> or <import> directives.

      Circular <include> or <import> directives are permitted.

      This is my mental model:

1. The processor fetches your top-level schema document, and then keeps
fetching any other schemas which are referenced through directives,
transitively, but whenever it sees a directive targetting something it has
already fetched, it doesn't fetch it again.  At the end of this process,
the "actual schema" to be used for processing now exists in memory, having
been merged from 1...n individual documents having the XML representation
of XML Schema.

2. Then the processor starts doing whatever it plans to do (validation of
instance documents during parsing, generating Data Binding code, generating
UI forms, or whatever).

      Because of subtleties associated with <redefine>, for the sanity of
anyone who may have to maintain what you design, I would try to avoid
circular redefines.

            Good Luck,
            Bob

Scalable XML Infrastructure
IBM Thomas J Watson Research Center
Yorktown Heights, New York, USA
http://www.research.ibm.com/XML




                                                                           
             vivek agarwal                                                 
             <vivekorama@gmail                                             
             .com>                                                      To 
             Sent by:                  xmlschema-dev@w3.org                
             xmlschema-dev-req                                          cc 
             uest@w3.org                                                   
                                                                   Subject 
                                       Multiple and circular               
             03/01/2005 01:41          import/include                      
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
               vivek agarwal                                               
                                                                           
                                                                           





Hi,

I have a question on multiple and circular import/include each, if
somebody could help.

Is it an error to import/include a schema more than once?
A import/includes B1 and B2.
Both B1, and B2, import/includes C.
What is the expected behaviour of the processor in such a case?

Are circular import/includes allowed?
A import/includes B, and B import/includes A?
What is the expected behaviour of the processor in such a case?

Thanks,
Vivek.
Received on Tuesday, 1 March 2005 20:17:41 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.