Re: xml schema

I think I may have made some statements which are erroneous or misleading 
and my earlier reply to you.  As I understand the latest state of the 
schemas design, duplicate <include>'s are strongly discouraged but not 
forbidden.

It is in any case an error to have conflicting versions of any given 
definition or declaration during any particular validation.  The latest 
design, as I understand it, says nothing more than that formally.  If a 
processor encounters includes for files that redefine or redeclare the 
same components, then the burden is on the processor to determine that the 
new versions of the components are identical to the old.  This will surely 
be true if you have included the same file twice, but there may be 
significant overhead to do the determination. 

The schema's specification neither requires nor prohibits the processor 
from using a variety of optimizations to detect that the same file has 
indeed been included twice.  For example, the processor might note that 
the identical URI had been referenced more than once, in which case all 
inclusions after the first can be ignored completely.  The processor might 
use some checksum or other technique to speed the comparison of files 
which do not have the same URI but which might be identical.  Or, the 
processor might do it the hard way, completely parsing the second file and 
verifying the correctness of each component as it is encountered.

I am sorry for any confusion that my earlier note might have caused.  It 
is still possible that there will be some refinement to the specification 
in this area.

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







Noah Mendelsohn
03/10/00 05:16 PM


        To:     jschmidt@inputsw.com
        cc:     ht@cogsci.ed.ac.uk, murray@muzmo.com, www-xml-schema-comments@w3.org
        Subject:        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 Tuesday, 21 March 2000 16:20:27 UTC