Re: Digging through section 6.2.1 / multiple types for an element

On 4/5/06, Nick_Van_den_Bleeken@inventivedesigners.com
<Nick_Van_den_Bleeken@inventivedesigners.com> wrote:
> www-forms-request@w3.org wrote on 04/05/2006 03:57:53 PM:
> > On 4/5/06, Nick_Van_den_Bleeken@inventivedesigners.com
> > <Nick_Van_den_Bleeken@inventivedesigners.com> wrote:
> > > But if this is the case, then when you have an attribute of type
> string in
> > > your schema you can't restrict it by using a type contsraint to an URI
> by
> > > using anyURI?
> >
> > Not as far as I can see, no. If it is xsd:string, any further
> > refinements needs to derive from xsd:string.
> >
> > But as I wrote, I'm no schema master.
> >
> I'm also no schema master ;), But it can be that it is the case if you
> read the schema spec, but is that what the original authors of the XForms
> spec meant, and more important is that how the users/implements think/want
> that it works.
> In my opinion it would be hard to sell that we have type constraints but
> we only allow derivations of the type that was specified in the schema.

In general I do not believe that XForms should run off and create
XForms-specific solutions for problems solved elsewhere. XML Schema
defines how this should work, and XForms should just adhere to that.

That said, as Steven correctly noted, Leigh pointed out a problem with
this wrt XForms Basic. So we need to fix something in the "bind type
is the same as xsi:type"-paragraph. To avoid conflicting we should
check the "bind type" seperately from the schema+xsi:type defined
types. The result will be that you can have an element with both
xsd:anyURI and xsd:string as types.

> To go back to my example, if you now that the input needs to be an URI for
> this special case and the schema author decided to just put the string on
> it I have to create an derived type from string that has the same
> restrictions as URI. If I manage to do this, and the schema author decides
> to change the type to a type that he derived from string, then I need to
> adjust my form again ...

I would say that that is either a bad design or mis-use of a design.
We cannot guard against that. But again, with the needed change to
6.2.1, you could do this.

--
... Allan

Received on Thursday, 6 April 2006 09:08:38 UTC