Re: input and secret

I think that the idea was to allow in general binding to atomic values
(which was not possible before XPath 2) rather than disallow it.

Binding to an atomic value simply makes the control readonly, as if it was
bound to a readonly node, and possibly makes the value's type available
(like in the case of a date).

It might not sound terribly useful but there are some use cases, for
example:

  <xf:input
      ref="
        if (condition) then
            some-node
        else
            'I show this readonly value'"

There was also a rationale for allowing `xf:repeat` to iterate over atomic
values:

    <xf:repeat ref="1 to 10">

so it feels consistent to allow atomic values wherever possible.

-Erik

On Mon, Oct 24, 2016 at 3:12 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

>
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_input_Element
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The
> _secret_Element
>
> "Data Binding Restrictions: Binds to any simpleContent (except
> xs:base64Binary, xs:hexBinary or any datatype derived from these) or an
> atomic value."
>
> An atomic value? Really?
>
> Steven
>
>

Received on Monday, 24 October 2016 14:59:52 UTC