MIPS: type and required combined

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MIPS: type and required combined

Don Smith-9
I'm not seeing the behavior I expect when combining
"type" and "required" MIPS.

What I'm seeing is this: if I put "type" on a model
item, the node becomes required and registers an error
if the user tries to submit the form instance without
providing a value for the field. This happens whether
"required" is left off (the default "false()") or set
explicitly to "false()".

This doesn't seem right to me. I would think that
setting the datatype yet having required set to
false() would make the node optional.

Am I missing something here, or is there some other
way to set the datatype on a node and still have it
optional?

I see by looking through the mail archives there is an
effort underway to address these issues:
http://mail.ow2.org/wws/arc/ops-users/2008-03/msg00593.html

Can you provide an update?

Thanks,

Don


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: MIPS: type and required combined

Erik Bruchez
Administrator
Don,

You would think so, but that's not how the XForms spec says it should  
work.

If you specify type="xs:decimal", you are strictly enforcing this  
type, whether you have required="false()" on the same node. Since  
xs:decimal does not support a blank value, the node will be invalid  
even if not required.

In other words, the notion of "validity" and "requiredness" are  
completely separate in XForms. Don't feel bad, I do remember that we  
at Orbeon were confused by this a few years ago too, when we started  
looking at the XForms 1.0 spec.

The approach chosen by XForms 1.1 to solve your problem instead  
consists in providing extension types of the form xforms:decimal, etc.  
Those allow empty values. They are implemented in Orbeon Forms.

Regarding the email you are pointing at: what we have changed in  
Orbeon Forms recently regards when an alert is shown: we used to show  
alerts only when a control was invalid, but we now how it also if it  
is required but empty. We think that this is good default behavior,  
however, this behavior really shouldn't be hardcoded, it should be  
entirely controllable through CSS. This is the part where things are  
still lacking a bit at the moment.

-Erik

On Apr 25, 2008, at 7:20 AM, Don Smith wrote:

> I'm not seeing the behavior I expect when combining
> "type" and "required" MIPS.
>
> What I'm seeing is this: if I put "type" on a model
> item, the node becomes required and registers an error
> if the user tries to submit the form instance without
> providing a value for the field. This happens whether
> "required" is left off (the default "false()") or set
> explicitly to "false()".
>
> This doesn't seem right to me. I would think that
> setting the datatype yet having required set to
> false() would make the node optional.
>
> Am I missing something here, or is there some other
> way to set the datatype on a node and still have it
> optional?
>
> I see by looking through the mail archives there is an
> effort underway to address these issues:
> http://mail.ow2.org/wws/arc/ops-users/2008-03/msg00593.html
>
> Can you provide an update?
>
> Thanks,
>
> Don
>
>
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: MIPS: type and required combined

Don Smith-9
Eric,

Thanks. I updated my type to the xforms namespace and
that did what I needed. I'll have to spend some time
on the 1.0 and 1.0 spec concepts of validity and
requiredness.

Don
--- Erik Bruchez <[hidden email]> wrote:

> Don,
>
> You would think so, but that's not how the XForms
> spec says it should  
> work.
>
> If you specify type="xs:decimal", you are strictly
> enforcing this  
> type, whether you have required="false()" on the
> same node. Since  
> xs:decimal does not support a blank value, the node
> will be invalid  
> even if not required.
>
> In other words, the notion of "validity" and
> "requiredness" are  
> completely separate in XForms. Don't feel bad, I do
> remember that we  
> at Orbeon were confused by this a few years ago too,
> when we started  
> looking at the XForms 1.0 spec.
>
> The approach chosen by XForms 1.1 to solve your
> problem instead  
> consists in providing extension types of the form
> xforms:decimal, etc.  
> Those allow empty values. They are implemented in
> Orbeon Forms.
>
> Regarding the email you are pointing at: what we
> have changed in  
> Orbeon Forms recently regards when an alert is
> shown: we used to show  
> alerts only when a control was invalid, but we now
> how it also if it  
> is required but empty. We think that this is good
> default behavior,  
> however, this behavior really shouldn't be
> hardcoded, it should be  
> entirely controllable through CSS. This is the part
> where things are  
> still lacking a bit at the moment.
>
> -Erik
>
> On Apr 25, 2008, at 7:20 AM, Don Smith wrote:
>
> > I'm not seeing the behavior I expect when
> combining
> > "type" and "required" MIPS.
> >
> > What I'm seeing is this: if I put "type" on a
> model
> > item, the node becomes required and registers an
> error
> > if the user tries to submit the form instance
> without
> > providing a value for the field. This happens
> whether
> > "required" is left off (the default "false()") or
> set
> > explicitly to "false()".
> >
> > This doesn't seem right to me. I would think that
> > setting the datatype yet having required set to
> > false() would make the node optional.
> >
> > Am I missing something here, or is there some
> other
> > way to set the datatype on a node and still have
> it
> > optional?
> >
> > I see by looking through the mail archives there
> is an
> > effort underway to address these issues:
> >
>
http://mail.ow2.org/wws/arc/ops-users/2008-03/msg00593.html

> >
> > Can you provide an update?
> >
> > Thanks,
> >
> > Don
> >
> >
> >      
> >
>
____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

> >
> >
> > --
> > You receive this message as a subscriber of the
> [hidden email]  
> > mailing list.
> > To unsubscribe:
> mailto:[hidden email]
> > For general help:
> mailto:[hidden email]?subject=help
> > OW2 mailing lists service home page:
> http://www.ow2.org/wws
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the
> Right Way
> http://www.orbeon.com/
>
> >
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page:
> http://www.ow2.org/wws
>


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: MIPS: type and required combined

Erik Bruchez
Administrator
In fact you should check the 1.1 spec, which is more up to date wrt  
these concepts.

I should mention that we are discussing related issues in the Forms  
Working Group at the moment. We are aware that the current situation  
can be a little confusing, and we are looking at whether anything can  
be done to make it easier to understand.

-Erik

On Apr 28, 2008, at 12:02 PM, Don Smith wrote:

> Eric,
>
> Thanks. I updated my type to the xforms namespace and
> that did what I needed. I'll have to spend some time
> on the 1.0 and 1.0 spec concepts of validity and
> requiredness.
>
> Don
> --- Erik Bruchez <[hidden email]> wrote:
>
>> Don,
>>
>> You would think so, but that's not how the XForms
>> spec says it should
>> work.
>>
>> If you specify type="xs:decimal", you are strictly
>> enforcing this
>> type, whether you have required="false()" on the
>> same node. Since
>> xs:decimal does not support a blank value, the node
>> will be invalid
>> even if not required.
>>
>> In other words, the notion of "validity" and
>> "requiredness" are
>> completely separate in XForms. Don't feel bad, I do
>> remember that we
>> at Orbeon were confused by this a few years ago too,
>> when we started
>> looking at the XForms 1.0 spec.
>>
>> The approach chosen by XForms 1.1 to solve your
>> problem instead
>> consists in providing extension types of the form
>> xforms:decimal, etc.
>> Those allow empty values. They are implemented in
>> Orbeon Forms.
>>
>> Regarding the email you are pointing at: what we
>> have changed in
>> Orbeon Forms recently regards when an alert is
>> shown: we used to show
>> alerts only when a control was invalid, but we now
>> how it also if it
>> is required but empty. We think that this is good
>> default behavior,
>> however, this behavior really shouldn't be
>> hardcoded, it should be
>> entirely controllable through CSS. This is the part
>> where things are
>> still lacking a bit at the moment.
>>
>> -Erik
>>
>> On Apr 25, 2008, at 7:20 AM, Don Smith wrote:
>>
>>> I'm not seeing the behavior I expect when
>> combining
>>> "type" and "required" MIPS.
>>>
>>> What I'm seeing is this: if I put "type" on a
>> model
>>> item, the node becomes required and registers an
>> error
>>> if the user tries to submit the form instance
>> without
>>> providing a value for the field. This happens
>> whether
>>> "required" is left off (the default "false()") or
>> set
>>> explicitly to "false()".
>>>
>>> This doesn't seem right to me. I would think that
>>> setting the datatype yet having required set to
>>> false() would make the node optional.
>>>
>>> Am I missing something here, or is there some
>> other
>>> way to set the datatype on a node and still have
>> it
>>> optional?
>>>
>>> I see by looking through the mail archives there
>> is an
>>> effort underway to address these issues:
>>>
>>
> http://mail.ow2.org/wws/arc/ops-users/2008-03/msg00593.html
>>>
>>> Can you provide an update?
>>>
>>> Thanks,
>>>
>>> Don
>>>
>>>
>>>
>>>
>>
> ____________________________________________________________________________________
>>> Be a better friend, newshound, and
>>> know-it-all with Yahoo! Mobile.  Try it now.
>>
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the
>> [hidden email]
>>> mailing list.
>>> To unsubscribe:
>> mailto:[hidden email]
>>> For general help:
>> mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page:
>> http://www.ow2.org/wws
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the
>> Right Way
>> http://www.orbeon.com/
>>
>>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page:
>> http://www.ow2.org/wws
>>
>
>
>
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws