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

Hi, here is a draft of for the option element... which I've renamed
param ("inspired" by HTML5;))

=The param Element=
The param element defines a parameter for a feature. A parameter is
name-value pair that a user agent must pass to the corresponding
feature for which the parameter is declared for. The relationship of a
parameter to a feature is established by having a param element as a
direct child of a feature element.

Outside the context of a feature element, a param element does not
represent anything and a user agent must ignore it.

Context in which this element may be used:
  As a child of the feature element.
Content model:
 Empty.
Occurrences:
  Zero or more.

==Attributes==
name
 Required. A string, which may be empty, that denotes the name of this
parameter.
value
 Required. A string, which may be empty, that denotes the value of
this parameter.

Kind regards,
Marcos

On Thu, Mar 19, 2009 at 11:26 AM, Marcos Caceres <marcosc@opera.com> wrote:
> 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
>



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

Received on Thursday, 19 March 2009 15:19:25 UTC