Re: xml schema

Henry can give you more details on some of the trickier edge conditions, 
but I know that he is very busy editing, so I will try to fill in the big 
picture as a start.

Yes, a schema document can include other schema documents which themselves 
contain <include> elements.  However, you have to be a little careful. The 
rules prohibit duplicate definitions or declarations, whether in one 
schema document or a set of included documents.  In general, it is not 
practical for us to recognize when the same schema document has been 
included twice (e.g. different URI's often point to the same document),and 
as I recall we do not go onto the slippery slope of trying to do such 
matching even in the simple case where the URI's are the same.  In other 
words, you must make sure that your included documents don't have 
duplicate definitions for declarations, and you should make sure not to 
include the same schema more than once.

Likewise, you can and indeed must use import in every schema document that 
needs to refer to definitions or declarations from other target 
namespaces.  In the case of import, each namespace can be imported at most 
once in a given schema document, but the same namespace may be indirectly 
imported by other schema documents which have been imported or included 
for the same validation.  As noted above, it is always an error if any 
such combination of documents causes a duplicate definition or 
declaration.

Forward references such as the ones you illustrate are supported.  Global 
definitions and declarations can occur in any order.

Some of the above is from memory.  The pertinent sections of this 
specification covering import and include are still being rewritten, so it 
is difficult to find a normative reference on some of these things at the 
moment.  I hope that Henry (lead editor) or other members of the group 
will correct any misstatements in the above.

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







jschmidt@inputsw.com
Sent by: www-xml-schema-comments-request@w3.org
03/10/00 04:14 PM

 
        To:     www-xml-schema-comments@w3.org
        cc:     ht@cogsci.ed.ac.uk, murray@muzmo.com, (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        xml schema


hello, 

i'll try to keep it brief. 

the good news: 

we have been quietly working on an easy-to-use xml schema editor.  i think 
when you eventually see it you will be surprised at how easy it is to use 
while still maintaining compatibility with xml-schema.  if we are 
successful (and we usually are), the fears about xml schema being too 
complicated may be short-lived. 

question: 

are you allowed to nest include/import statements?  (i think the answer 
should be yes). 
does the order of definitions in an xsd file matter?  for example, is the 
following ok? 

<simpleType name="a" base="b"/> 
<simpleType name="b" base="integer"/> 

(i would like the answer to be that order does not matter but expect this 
isn't your intent). 

thanks, 

johannes 
cto 
jschmidt@inputsw.com 
408-325-3838 

ps: where is the xml schema newsgroup?  is there one?

Received on Friday, 10 March 2000 17:18:01 UTC