W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: Forcing a certain document element

From: <Noah_Mendelsohn@lotus.com>
Date: Mon, 15 Jan 2001 10:02:26 -0500
To: "Martin J. Duerst" <duerst@w3.org>
Cc: ht@cogsci.ed.ac.uk (Henry S. Thompson), ian@decisionsoft.com, vdv@dyomedea.com, xmlschema-dev@w3.org
Message-ID: <OFE3D25F95.B6F3D692-ON852569D5.00531FDE@lotus.com>
Martin Duerst writes:

>> However, this does not mean that it is wrong to be able 
>> to (easily, and for some cases, in the Schema itself) to
>> express what top level element(s) can actually be 
>> used, or does it?

I don't think it's wrong, but it is an additional feature for which 
semantics must be defined, edge cases considered, syntax created, etc. 
(not that we've been shy about features so far.)  The primary reason I 
like the status quo is that partial validation, I.e. of a portion of a 
document, is not a special case.  Yes, we could have different validation 
modes in which you would tell the processor:  I'm validating from the 
root, please enforce the restriction in the schema document vs. I'm doing 
incremental validation, trust me.   However, you can imagine instabilities 
in which an editor, for example, first successfully does an incremental 
validation on a portion of the document, then discovers later that the 
root was inappropriate all along.  Not a big deal I think, but something 
to consider.

I think the real crux of this is:  do you want the schema author to 
declare the intended root, or is it appropriate for the consuming 
application to check.  We went for the latter.  The check itself is 
certainly trivial.  The question is whether there is sufficient value in 
capturing the schema author's intention, or in doing the check generically 
(e.g. when the consuming application is a browser that accepts lots of 
vocabularies), to motivate the modest complexity of an additional feature.

It does seem to me to be a reasonable candidate for V2, as it is merely an 
additional restriction which is more or less orthogonal to the rest of our 

Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
Received on Monday, 15 January 2001 10:13:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:49 UTC