A Few More Tags: The OpenSocial Markup Language
The OpenSocial Markup Language, or OSML, is a direct subset of OpenSocial templating. We have already seen many expression tags and custom tag definitions used within the gadget template context, but now we’ll take that a little bit further and explore some of the other functional tags that are available using this functional template subset.
OSML includes several standard tags that may aid you in your development, including:
os:NameUsed to display the name of a particular person
os:PeopleSelectorUsed to display a person selector box
os:BadgeUsed to display a standard badge for a user
os:GetUsed for loading external HTML content to insert into the gadget
To be able to render and use these tags, the gadget must include a
Require statement to pull in the
necessary JavaScript functionality:
<Require feature="osml" />
As I already mentioned, OSML is a direct subset of OpenSocial
templating. Thus, if we have already included the templating Require element, we will not have to include the
OSML feature element just described:
<Require feature="opensocial-templates" />
There are two separate Require
statements available for including OSML tags because of the restrictions
some containers impose on which views a gadget can implement templating on
(due to potential performance issues).
The main value in any container-defined tags like these is that they provide secure access to a user’s personal information without requiring the user’s permission to do ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access