- From: Edmund Lai <edmund.lai@gmail.com>
- Date: Wed, 30 Jun 2004 17:19:20 -0700
I reply to this thread earlier without realizing that I am not sending it to the list and only to Ian. Ian kindly answer it in private e-mail. Maybe we can change the default reply to the group rather than the individual mail sender for the benefits of idiots like me. Any way here is Ian's message and my comments. On Wed, 30 Jun 2004 12:18:22 +0000 (UTC), Ian Hickson <ian at hixie.ch> wrote: > > > (You sent your e-mail directly to me, so I haven't cc'ed the list. Feel > free to forward my e-mail to the list if you want.) > > On Sun, 27 Jun 2004, Edmund Lai wrote: > > > > I think a lot of the discussions here on datatype is related to W3C XML > > schema part 2: Datatypes. Rather than inventing a new set, we should > > take advantage of XML schema. And even if we don't want to do the full > > XML schema spec, we should borrow the idea as much as possible. > > Why? Is there any advantage to using the (complex) data type structure of > XML Schema rather than simply extending the existing HTML4 data types? > First of all I am only talking about W3C XML schema part 2: Datatypes, which is about simpleType and is fairly simple compared to the rest of the XML schema. The first advantage is that we have an established comprehesive datatype standard that has been tested and used extensively. The standard goes beyond what is proposed here. So there is no reason to revent it again. As more and more people are getting familiar with the W3C XML schema datatypes, developers do not need to learn two set of datatype standard and this would reduce the learning curve. The second advantage is that as more and more data are stored in XML format described by XML schema, developer who wants to use WF2(Web Forms 2.0) to enter their XML data would have a easier time if the same datatype described in XML schema can be used WF2. In fact the process can be automated by some tool. The third advantage is that if we can have type definition, then let say we have a datatype with a long and complicated pattern used in 10 different places, we don't ned have that pattern in 10 different places. > There are plenty of disadvantages: > > 1. The types in HTML4 don't have equivalents in XML Schema. How would you > describe the following types in XML Schema?: > > <input type="password" ...> > <input type="checkbox" ...> > <input type="radio" ...> > <input type="submit" ...> > <input type="file" ...> > <input type="image" ...> > <input type="hidden" ...> > Actually what is needed is that every datatype in XML schema can be represented by a type in WF2, and not the other around. The goal is that every XML element can be presented as a web form element. The goal is not every web form element can be represented by an XML element. > 2. Changing the types in HTML4 to be the ones in XML Schema breaks > backwards compatibility with existing content and legacy UAs. > I have no problem with keeping those types for backward compability. I have not saying we should just use XML schema datatype as is. It certainly should be a superset. > 3. The types in XML Schema are less readable than those in Web Forms 2.0 > and HTML4. For example, where HTML4 has the type "text", XML Schema has > the type "normalizedString". > Again I have no problem with having some legacy names, there are very few anyway. > 4. The facets in XML Schema don't map well to the facets in HTML4, and > don't map well to extensions. For example, mapping from a complex list > type definition to the "multiple" attribute on <select> is awkward. > I don't see how the facets does not map well. There is no problem with maxlength except that it needs to be adjusted for binary. Other facets are newly defined in WF2 and can be defined to be compatiable. Speaking of facets, WF2 only has inclusive min and max values, while XML schema has maxInclusive, minExclusive as well as maxExclusive and minExclusive. So there are conditions that can be declared in XML schema but not in WF2. That is another reason why we should base WF2 on XML schema datatype. It is a standard that was discussed for a long time and it is less likely that they would miss something. I am not sure if I understand the complex list example so I cannot comment on it. > 5. Some of the distinctions in Web Forms 2.0 have no equivalent in XML > Schema. For example XML Schema has no data type that distinguishes a > number (e.g. purchase quantity) from an approximate number (e.g. sound > volume), but in Web Forms 2.0 there are distinct types ("number" and > "range" respectively). > Again I have no problem with adding new built-in datatype in WF2. > > > -- > Ian Hickson U+1047E )\._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' >
Received on Wednesday, 30 June 2004 17:19:20 UTC