Gadget XML Spec. Print

Gadget XML which can be used in infoScoop OpenSource is fundamentally based on Gadget XML Schema of OpenSocial.

But about the attribute which has not been indicated, we do not guarantee operation.

 

/Module

Attribute

Description

Requirement / Default

@specificationVersion

The version of the OpenSocial specification.

If this value is less than 2.0, the Gadget is

rendered in browser quirks mode. With 2.0 or more, the Gadget is rendered in HTML5.

1.0

 

/ModulePrefs

Attribute

Description

Requirement / Default

@title

The gadget’s title. It is displayed on the header of a gadget.

Required

@title_url

If @title is displayed, it becomes a link of this value.

 

@height

The preferred default height of the gadget, in pixels.

200

@doctype

A string that identifies the preferred rendering method. When set to quirksmode, the Gadget is rendered in browser quirks mode.

 

 

/ModulePrefs/Require and /ModulePrefs/Optional

Attribute

Description

Requirement / Default

@feature

The name of the Feature.

Refer to the “Available Features” for the details of the Feature.

Required

@views

A comma-separated list of Views to load this feature for.

Refer to the “Available Features” for the details of the available view type.

 

 

/ModulePrefs/Require/Param and /ModulePrefs/Optional/Param

Attribute

Description

Requirement / Default

@name

The name of the parameter.

The parameter which can be used is dependent on Feature.

Required

 

/ModulePrefs/Locale

Attribute

Description

Requirement / Default

@lang

The language for this locale.

ALL

@country

The country for this locale.

ALL

@messages

The URL of a message bundle.

 

@language_direction

Specifies the direction to render the gadget in. Valid values are rtl (right to left) and ltr (left to right).

 

 

/ModulePrefs/Locale/msg

Attribute

Description

Requirement / Default

@name

The name of the localized message.

Required

text()

The value of the message.

This value is acquirable by JavaScript API method gadgets.Prefs.getMsg(@name) and for MSG substitutions. __MSG_{@name}__

 

 

/ModulePrefs/OAuth

Supplies the container with OAuth service configuration for the gadget. This tag has no attributes and has child elements.

 

/ModulePrefs/OAuth/Service

Attribute

Description

Requirement / Default

@name

The name of the service, used for referencing OAuth services at runtime. Gadget developers specify which OAuth service they wish to use by passing the service name as a parameter to gadgets.io.makeRequest.

 

 

/ModulePrefs/OAuth/Service/Request

Attribute

Description

Requirement / Default

@url

The URL for acquiring a request token.

Required

@method

The HTTP verb to use for making the request. (GET | POST)

POST

 

/ModulePrefs/OAuth/Service/Access

Attribute

Description

Requirement / Default

@url

The URL for acquiring a access token.

Required

@method

The HTTP verb to use for making the request. (GET | POST)

POST

 

/ModulePrefs/OAuth/Service/Authorization

Attribute

Description

Requirement / Default

@url

The OAuth authorization URL.

Required

 

/ModulePrefs/OAuth2

Supplies the container with OAuth 2.0 service configuration for the gadget. This tag has no attributes and has child elements.

 

/ModulePrefs/OAuth2/Service

Attribute

Description

Requirement / Default

@name

The name of the service, used for referencing OAuth 2.0 services at runtime. Gadget developers specify which OAuth 2.0 service they wish to use by passing the service name as a parameter to gadgets.io.makeRequest.

 

@scope

The value of the OAuth 2.0 scope parameter to be used by default in requests. This value is superseded when gadgets.io.RequestParameters.OAUTH2_SCOPE is used.

 

 

/ModulePrefs/OAuth2/Service/Authorization

Attribute

Description

Requirement / Default

@url

The URL for acquiring a authorization code.

Required

@method

The HTTP verb to use for making the request. (GET | POST)

GET

 

/ModulePrefs/OAuth2/Service/Token

Attribute

Description

Requirement / Default

@url

The URL for acquiring a access token.

Required

 

/UserPref

Attribute

Description

Requirement / Default

@name

The name of the preference.

The character string default and enum cannot be used for the this attribute.

Required

@datatype

The data type for this preference. Valid values are string, hidden, bool, list, and number.

When @datatype is list, if the character string %7C is inputted, it will replace by |.

string

@display_name

The name of the preference for use when rendering an editing interface for prefs.

 

@default_value

A default value for this preference.

 

@required

Whether or not a valid value needs to be set for this preference in order for the gadget to function correctly. Valid values are true and false.

false

 

/UserPref/EnumValue

Attribute

Description

Requirement / Default

@value

The value for this enumeration element.

Required

@display_value

A textual representation of @value.

value of @value

 

/Content

Attribute

Description

Requirement / Default

@type

The type of content included in the body of this element. Valid values are html and url.

When @type is html, the Gadget is rendered in container.

When @type is url, The Gadget is displayed at /Content/@href.

html

@href

If @type is url, this value is REQUIRED.

The Gadget is displayed at this url.

 

@view

Either home or canvas is specified.

Usually, home is displayed.

canvas is displayed at the time of maximization.

home

text()

When @type is html, if no @href is specified, this html is rendered in Gadget.

 

 


Add this to your website
Last Updated on Thursday, 22 December 2011 17:36