Re: [widgets] <option>s on <feature>s

Hi Robin,

On Thu, Mar 19, 2009 at 7:34 AM, Marcos Caceres <marcosc@opera.com> wrote:
> On Thu, Mar 19, 2009 at 7:27 AM, Robin Berjon <robin@berjon.com> wrote:
> Will fix required. Required denotes if a feature is absolutely needed
> for the widget to function (i.e., without this feature, the widget
> serves no purpose.)
>

I've simplified the <feature> element a bit (removed feature fall back
behavior, which we may reintroduce in 1.1 or 2.0 or whatever). I tried
to make the definition of the required attribute more clear.  The new
def is as follows:

[[
=The feature Element=
A feature is a runtime component (e.g. an API) that is not part of the
standard set provided by the Widgets 1.0 family of specifications.
Using a feature element denotes that, at runtime, a widget may attempt
to access the feature identified by the feature element's name
attribute.

Note: the feature element is not a means to import javascript
libraries or other resources available on the Web. The feature element
should be viewed as a standardized way to request the binding of an
(URI) identifiable runtime component to a widget for use at runtime.

Context in which this element may be used:
   In the widget element.
Content model:
  Empty.
Occurrences:
  Zero or more.

==Attributes==

name
  Required. A URI attribute that identifies a feature that may be
needed by the widget at runtime (such as an API).

required
  Optional. A boolean attribute that indicates whether or not this
feature must be available to the widget at runtime. In other words,
the required attribute denotes that a feature is absolutely needed by
the widget to function correctly, and without the availability of this
feature the widget serves no useful purpose or won't execute properly.
The default value when this attribute is absent is true, meaning that
the feature is must be made available to the widget by the widget at
runtime.

==Usage example==
This example demonstrates a widget that would like to use a fictional
geolocation API feature, but would still be able to function if the
feature cannot be made available to the widget by the user agent.

<widget xmlns="http://www.w3.org/ns/widgets">
   <feature name="http://example.org/api.geolocation"
            required="false"/>
</widget>

]]

-- 
Marcos Caceres
http://datadriven.com.au

Received on Thursday, 19 March 2009 10:27:04 UTC