Re: Comment on xmlIDsemantics32

OK, thanks.  Sounds as if we agree completely.  FWIW, I took the quote as 
impying "should always be separated", which you make clear was not in fact 
your intent.  Whether to clarify the wording I leave to you.  Thanks!

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------







Chris Lilley <chris@w3.org>
Sent by: www-tag-request@w3.org
06/16/2003 01:51 PM
Please respond to Chris Lilley

 
        To:     noah_mendelsohn@us.ibm.com
        cc:     "Dare Obasanjo" <dareo@microsoft.com>, "Glenn A. Adams" <glenn@xfsi.com>, 
www-tag@w3.org
        Subject:        Re: Comment on xmlIDsemantics32



On Monday, June 16, 2003, 5:59:17 PM, noah wrote:

>>> "Validation and typing are separable but often conflated concepts. 
nuic> IDness is a consequence of parsing a DTD, not of validation."

nuic> This seems too strong.  Certainly there are situations in which 
typing (or 
nuic> assignment of defaults, etc.) is best thought of as separate from 
nuic> validation.  I respect that there are those who believe that the two 

nuic> notions are often or always better separated.

No, I don't claim that there is never a benefit to combining them,
only that they are seperable. Combining is an option, not a
requirement. Which is why i specifically used the word 'separable' not
'separate'.

nuic> I'm not sure it's fair to say that there is concensus on that.

I don't claim consensus that they should always be separated, only
that they are, demonstrably, separable. Even when they are combined in
a given specification, that is a design choice not a necessity.

I also claim that they are often incorrectly conflated, which is an
observation based on some very smart people who still, in off the cuff
remarks and with a probability that correlates with number of years of
SGML experience, will assert that they are the same (and will back off
rapidly on being presented with the example below). Which is not to
say that they should never be *combined*. Combination, as a design
choice, is quite different from erroneously believing the are
identical concepts.

Specifically, given this example in the finding:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [
<!ATTLIST foo partnum ID #IMPLIED> ]>
<foo  partnum="i54321" bar="toto"/>

I claim consensus that the instance is

a) well formed
b) not valid to a DTD
c) not validatable [must add 'to a DTD']
d) partnum is of type ID


I accept that, since W3C XML Schema does not mandate a method of
binding to schema, that a command line invocation of a schema could
supply this information which might or might not result in validation.
So its incorrect to claim without further qualification that this
instance is not validatable.

My point in all this is to discourage loose talk that always equates
'validation' and 'typing'. Only a single counter example is required
to disprove such an equality.

nuic>  Consider, for example, locally
nuic> scoped elements.  Without writing out the whole schema, lets look at 
an 
nuic> example of a simple bibliography reference:

nuic> <book>
nuic>         <isbn>0553213113</isbn>
nuic>         <title>Moby Dick</title>
nuic>         <author>
nuic>                 <title>Mr.</title>
nuic>                 <firstName>Herman</firstName>
nuic>                 <lastname>Melville</lastName>
nuic>         </author>
nuic> </book>

nuic> Note the two uses of a <title> element.  In W3C XML schema, we might 
guess 
nuic> that the <title> that's a child of <book> would be <xsd:string>. The 

nuic> <title> that's within the <author> field might better be typed as an 

nuic> enumeration of {Mr. Mrs., Ms., Dr., etc.}.

Yes.

nuic>  Is it not natural in practice
nuic> to combine the process of validation, which establishes the context 
to 
nuic> determine correctness, with the process of assigning (and if desired 

nuic> validating against ) the type?

It might be, but that is a design choice. What you have shown is that
context-dependent typing needs to be considered. That is separable
from validation.

Just because DTDs were poor at such context dependency (I cannot say
using DTDs that the content model of foo is a|b|c if foo is a child of
bar but d|e otherwise) does not mean that context dependent
association of information is uncommon or not used.

CSS for example has been able to associate information with
context-dependent elements since its inception, and improved in CSS2.
For example

title { display: block }
author > title {display: inline}

title elements that are direct children of author elements are here
displayed inline whereas others title elements are block.

Its easy to imagine a schema language that says

<type pattern="author/title" value="Mr|Mrs|Ms|Dr"/>

thus showing that a contextual type is separable from validation.

nuic> I can see that there are two sides of this issue, but I think
nuic> it's a bit too glib just just say that these "ARE separable but
nuic> often conflated".

No, I think they are indeed separable, and further I think

a) you agree with me, and

b) we both agree that it (would be) incorrect to say 'they must always
be separated' or 'should not be combined'.


-- 
 Chris                            mailto:chris@w3.org

Received on Monday, 16 June 2003 14:42:29 UTC