- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 13 Jul 2004 14:20:22 +0000 (UTC)
On Thu, 8 Jul 2004, Edmund Lai wrote: > > OK, here is what I mean. > > Just like style can be defined in a stylesheet or inline, datatype can > be defined in a type definition or inline. [...] > > <simpleType name="multipleOfTen"> > <restriction base="integer"> > <pattern value=".*0"/> > </restriction> > </simpleType> > <input id="input1" name="input1" type="multipleOfTen" value="20" /> > <input id="input2" name="input2" type="multipleOfTen" value="40" /> This doesn't seem to be simpler than what the draft current suggests: <input name="input11" type="integer" step="10" value="20"> <input name="input11" type="integer" step="10" value="40"> >>> Then we can have list and union of datatypes. >> >> If that is the only reason to use XML Schema datatypes, there are >> definitely better ways to achive that goal. As I have pointed out, the >> XML Schema datatypes have a large number of problems which would make >> importing them into HTML much more work than it is worth, IMHO. > > I have been working on this using JavaScript, I really don't see it > being a lot of work. Besides, why reinvent the wheel? When the wheel is a 300-ton, carbon-bonded, triple-alloy, tapered spoke mega-wheel with nuclear-powered locomotion, and all you actually want is a little wooden circle, it is usually best to reinvent it. :-) > > > We can define a datatype once and use it in different places of the > > > web page. > > > > Could you give an example of how this would work? > > The example above shows how this would work. I don't understand the benefits of what you are proposing. It would slightly simplify the life of those wanting to edit documents for which they already have schemas, at the cost of massively increasing the complexity for implementors, for whoever writes the test suite, for me (as the spec editor), and for anyone who tries to learn how it works. > <simpleType name="listOfUnions"> > <list> > <simpleType> > <union memberTypes="date integer"/> > </simpleType> > </list> > </simpleType> What's the use case for things like this? > <simpleType name="UnionOfLists"> > <union> > <simpleType> > <list itemType="date"/> > </simpleType> > <simpleType> > <list itemType="xs:integer"/> > </simpleType> > </union> > </simpleType> Could you explain how a UA would work out what UI to render for a control that claimed to be of this type? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 13 July 2004 07:20:22 UTC