This project is read-only.

Simple Feed Bindings Specification

Dec 3, 2009 at 4:38 PM

Version: 0.94

Contact: Jack Ozzie, Matt Augustine, Paresh Suthar, Steven Lees and Nigel Snoad, Microsoft Corporation

Last updated: 2 April, 2009

Licensing:  See section 5

1. Overview

Simple Feed Bindings are designed as extensions on top of FeedSync for Atom and RSS (see http://www.feedsync.org/spec) that provide both structured and UI representation for feed item data.

1.1 Background

A feed is a collection of items. The feed typically represents either a subset of or the entire collection of items. Consumers of feeds need to process items in the feeds differently based on the kind of item. For example, a feed that contains both a collection of contacts and a collection of calendar entries should have its contacts processed differently from its calendar entries.

The purpose of Simple Feed Bindings (SFB) is to define XML namespace extensions that represent an application metamodel, where the metamodel describes the structure and properties of items that can be found in the feed. This allows publishers to understand how to create or update items and it also allows subscribers to understand how to process them.

SFB was primarily designed to allow the creation of simple forms where both data and presentation aspects could be specified, allowing for heterogeneous applications and implementations to provide a common user experience. It was also designed so that these simple forms could be dynamically updated such that the changes would propagate to all applications and implementations.

2. Example – Contacts With Geo

This is an example of how SFB could be used for contacts with geographic location information in an RSS feed:

<rss version="2.0" xmlns:sfb="http://feedsync.org/namespaces/binding" xmlns:csa_contact="http://www.microsoft.com/schemas/csa/contact" xmlns:geo= "http://www.w3.org/2003/01/geo/wgs84_pos#">

  <channel>

    <title>Contacts</title>

    <description>Sample list of contacts</description>

    <sfb:binding id="urn:microsoft.com/schemas/nid/contactwithgeo" name="Contact With Geo" title="{csa_contact:fn}" description= "{csa_contact:info}">

      <sx:sync id="1a606a58-b0d0-42d7-a987-446554205377">

        <sx:history sequence="1" when="2006-09-22T20:00:00Z" by= "REO1750"/>

      </sx:sync>

      <sfb:namespace localprefix= "csa_contact" uri= "http://www.example.com/schemas/csa/contact"/>

      <sfb:namespace localprefix="geo" uri= "http://www.w3.org/2003/01/geo/wgs84_pos#/>

      <sfb:field element="csa_contact:fn" required="true" contenttype="text" label="Full Name"/>

      <sfb:field element="csa_contact:info" label="Comments" multiline= "true"/>

      <sfb:field element="geo:lat" label="Latitude" type="floatingpoint"  defaultvalue= "0.0"/>

      <sfb:field element="geo:long" label="Longitude" type="floatingpoint"  defaultvalue= "0.0"/>

      <sfb:field element="csa_contact:Addresses/csa_contact:Address" label="Addresses" array="true"/>

      <sfb:field element="csa_contact:Created" label="CreatedOn" required="true" type= "datetime"/>

      <sfb:field element="csa_contact:Gender" label="Gender" required="true" picklist= "gender"/>

      <sfb:picklist id="gender">

        <sfb:listitem>Male</sfb:listitem>

        <sfb:listitem>Female</sfb:listitem>

      </sfb:picklist

    </sfb:binding>

    <item>

      <sx:sync id="ccc06a58-b0d0-42d7-a987-446554205377">

        <sx:history sequence="1" when="2006-11-22T20:00:00Z" by= "REO1750"/>

      </sx:sync>

      <title>Ray Ozzie</title>

      <description>Chief Software Architect</description>

      <sfb:reference id="urn:microsoft.com/schemas/sfb/contactwithgeo"/>

      <csa_contact:fn>Ray Ozzie</csa_contact:fn>

      <csa_contact:Created>2006-09-22T21:27:24Z</csa_contact:Created>

      <csa_contact:info>Chief Software Architect</csa_contact:info>

      <csa_contact:Gender>Male</csa_contact:Gender>

      <geo:lat>42.322</geo:lat>

      <geo:long>22.11</geo:long>

      <csa_contact:Addresses>

        <csa_contact:Address>1 Redmond Way, Redmond, WA 98052</csa_contact:Address>

        <csa_contact:Address>1 Main Street, Seattle, WA 98104</csa_contact:Address>

      </csa_contact:Addresses>

    </item>

  </channel>

</rss>

3. Simple Feed Bindings

3.1 Namespace

The following namespace declaration is used for XML elements in this document.

Namespace: http://feedsync.org/namespaces/binding

Description: This namespace defines all of the elements in this specification.

Prefix: sfb

3.2 XML Structure

SFB include a set of XML elements which enable the publisher to indicate the structure of an item’s namespaced data, so that a consumer of the feed understands how to create or update items.

Here is a skeletal view of a SFB XML fragment:

<sfb:binding>

  <sx:sync/>              1 element

  <sfb:namespace/>        0 or more elements

  <sfb:picklist>          0 or more elements

    <sfb:listitem/>       1 or more elements

  </sfb:picklist>

  <sfb:field>             1 or more elements

    <sfb:fieldextension/> 0 or 1 elements

  </sfb:field>

</sfb:binding>

Here is a detailed view of a SFB XML fragment:

<sfb:binding id="id" name="name" title="title" description="description"/>

  <sx:sync/>

  <sfb:namespace localprefix="localprefix" uri= "uri"/>

  <sfb:picklist id="id" />

    <sfb:listitem label="label">value</sfb:listitem>

  </sfb:picklist>

  <sfb:field

    element="element"

    label="label"

    contenttype="contenttype"

    type="type"

    defaultvalue="defaultvalue"

    picklist="picklistid"

    array="true | false" 

    required="true | false"

    readonly="true | false"

    hidden="true | false"

    multiline="true | false" >

    <sfb:fieldextension>value</sfb:fieldextension>

  </sfb:field>

</sfb:binding>

Details:

There can be 0 or more sfb:binding elements in a feed. If present, each sfb:binding element contains 1 or more sfb:field sub-elements and 0 or more sfb:namespace sub-elements.

Each instance of the sfb:namespace element makes reference to a namespace uri that is referenced by one or more sfb:field elements.

There can be 0 or more sfb:picklist elements in a binding. If present, the sfb:picklist element will have 1 or more sfb:listitem sub-elements. These elements represent a list of values that can be set for a field definition, and can be used by one or more sfb:field elements in a sfb:binding. For example, a picklist of the 50 states may be used on a "ship to" state field and a "bill to" state field.

Each instance of the sfb:field element makes reference to a sub-element of a feed item that is an instance of the defined structure. These elements may be considered properties of the item, and will be referred to as such below. For example, an item that is an instance of a contact may contain a property contactFullName, that represents the full name of the contact.

Each feed item within the feed MUST contain an sfb:reference sub-element, along with a corresponding id attribute, identifying which binding should be associated with the item. If an item within the feed does not contain a sfb:reference sub-element, then it is assumed that it is not associated with any sfb:binding.

 

The sfb:binding element contains the following attributes:

  • id - this attribute is the unique value representing the binding definition. This attribute is required. Note that this attribute MUST NOT be changed after its value has been set, and its value MUST NOT be reused.
  • name - this attribute is the value representing the human readable name of the binding. This attribute is required.
  • title - this attribute is the expression to use for the setting the title of items. The expression can consist of text and names of fields encapsulated in {}. For example if a sfb:field with element="foo:summary" exists, the publisher can set the title="The title is ‘{foo:summary}’ !!!". If title is omitted, the default value is an empty string, indicating that there is no mapping for the title of items.
  • description - this attribute is the expression to use for the setting the description of items. The expression can consist of text and names of fields encapsulated in {}. For example if a sfb:field with element="foo:body" exists, the publisher can set the description="The description is ‘{foo:body}’ !!!". If description is omitted, the default value is an empty string, indicating that there is no mapping for the description of items.

 

The sfb:namespace element contains the following attributes:

  • localprefix - this attribute is the identifier of the namespace definition. This value can be used as part of the element attribute for sfb:field elements to associate namespaces with xml elements. This attribute is required. Note that this attribute MUST NOT be changed after its value has been set, and its value MUST NOT be reused within the same sfb:binding element.
  • uri - this attribute is the namespace uri representing the namespace definition. This attribute is required. Note that this attribute MUST NOT be changed after its value has been set, and its value MUST NOT be reused within the same sfb:binding element.

 

The sfb:picklist element contains the following attributes:

  • id - this attribute is the unique value representing the picklist definition. Note that this attribute MUST NOT be changed after its value has been set, and its value MUST NOT be reused within the same sfb:binding element.

 

The sfb:listitem element also contains the following attributes:

  • label - this attribute contains a human-readable name for the property. If it is omitted, the client should use the value of the element as the human-readable name. This attribute is optional.

The sfb:listitem element contains a value, which can be empty, that represents the displayed picklist choice. Note that the element value MUST NOT be reused within the same sfb:picklist element.

 

The sfb:field element contains the following attributes:

  • element - this attribute is the name of the property. If one or more levels of hierarchy need to be represented, a "/" character should be placed in between each level (e.g. elem1/elem2). Also, if the array attribute is set to "true" and one or more "/" characters exist in the element value, then the portion of the element value after the rightmost "/" character represents the name of the array items. This attribute is required. Note that this attribute MUST NOT be changed after its value has been set, and it’s value MUST NOT be reused within the same sfb:binding element.
  • label - this attribute contains a human-readable name for the property. If it is omitted, the client should use the value of the "element" attribute as the human-readable name. This attribute is optional.
  • contenttype - this attribute represents the content type<sup>1</sup>; of data for the property. If it is omitted, the default value is "text".

<sup>1</sup>The following intrinsic values are defined for this attribute:

  • text - Generic string value
  • text/xml - Well-formed xml fragment
  • text/html - Html fragment
  • application/xhtml+xml - Well-formed xhtml fragment
  • type - this attribute represents the schema or format type<sup>2</sup> of data for the property when the IANA format identifier is insufficient to determine the type. This attribute is optional.

<sup>2</sup>The following intrinsic values are defined for this attribute:

  • datetime - Datetime value represented as UTC in ISO 8601 format (i.e. yyyy-MM-ddThh:mm:ssZ)
  • boolean - Boolean value that is represented as "true" for true, any other value represents false
  • number - Integral value that is represented by 8 bytes or less, in base 10 format
  • floatingpoint - Floating point value that is represented by 8 bytes or less
  • defaultvalue - this attribute contains a default value to use for the property. The default value must conform to the format/structure represented by the contenttype attribute. If it is omitted, no default value is associated with the property. This attribute is optional and is ignored when the isarray attribute value is "true".
  • picklist - this attribute associates a picklist with this sfb:field definition. The picklist typically will turn into a dropdown list or a multiselect list in a feed editor UI. The picklist should ignored by the feed editor if the deleted attribute is set to true.
  • array - this attribute indicates if the value of the property to which this sfb:field element refers is actually a collection of values. The allowed values are "true" and "false". If omitted, the default value is "false".
  • required - this attribute indicates whether the property to which this sfb:field element refers must contain a valid value. The allowed values are "true" and "false". If omitted, the default value is "false". Note that it is RECOMMENDED that at least one sfb:field within each sfb:binding be required.
  • readonly - this attribute indicates whether the property to which this sfb:field element refers should be displayed in a non-editable manner within an application. The allowed values are "true" and "false". If omitted, the default value is "false".
  • hidden - this attribute indicates whether the property to which this sfb:field element refers should be displayed within an application. The allowed values are "true" and "false". If omitted, the default value is "false".
  • multiline - this attribute indicates whether the property to which this sfb:field element refers should be displayed using a single line or multiple lines. The allowed values are "true" and "false". If omitted, the default value is "false". Note that this attribute is intended to be used only when the type attribute is not set.

 

The sfb:fieldextension element contains the following attributes:

The sfb:fieldextension is meant to serve as a container for application specific data. As such, all subscribers SHOULD preserve and republish this element, and it’s sub-elements, in its entirety.

 

4. Publisher & Subscriber Behaviors

This specification is based on FeedSync for Atom and RSS specification, and as such all behaviors and guidelines documented in it MUST be observed for the sfb:binding element.

Additionally, applications and implementations MUST be written in a manner such that they are resilient to the existence of additional data (e.g. data created with an newer binding but new binding not yet processed), as well as data that may be required but is missing (e.g. new binding processed but existing data does not reflect changes).

 

5. License Information

Microsoft’s copyrights in this specification are licensed under the Creative Commons Attribution-ShareAlike License (version 3.0). To view a copy of this license, please visit http://creativecommons.org/licenses/by-sa/3.0/. As to patents, Microsoft irrevocably promises not to assert any Microsoft Necessary Claims against you for making, using, selling, offering for sale, importing or distributing any implementation, to the extent it conforms to this specification, and is compliant with all of the required parts of the mandatory provisions of the specification ("Covered Implementation"), subject to the following: This is a personal promise directly from Microsoft to you, and you acknowledge as a condition of benefiting from it that no Microsoft rights are received from suppliers, distributors, or otherwise in connection with this promise. If you file, maintain, or voluntarily participate in a patent infringement lawsuit against a Microsoft implementation of the specification, then this personal promise does not apply with respect to any Covered Implementation made or used by you. To clarify, "Microsoft Necessary Claims" are those claims of Microsoft-owned or Microsoft-controlled patents that are necessary to implement the required portions (which also include the required elements of optional portions) of the specification that are described in detail and not those merely referenced in the specification. This promise by Microsoft is not an assurance that either (i) any of Microsoft's issued patent claims covers a Covered Implementation or are enforceable, or (ii) a Covered Implementation would not infringe patents or other intellectual property rights of any third party. No other rights except those expressly stated in this promise shall be deemed granted, waived or received by implication, exhaustion, estoppel, or otherwise.

 

 

Oct 12, 2010 at 10:59 AM

Is the feedsync.org still working ? It returns 404. Can you update the link ?

Oct 20, 2010 at 4:31 PM
Hrishikesh_Dewan wrote:

Is the feedsync.org still working ? It returns 404. Can you update the link ?

 Sorry for the downtime - the specs and samples now all exist on this CodePlex site.

Oct 27, 2010 at 5:10 PM
thanks



From: [email removed]
To: [email removed]
Date: Wed, 20 Oct 2010 08:31:31 -0700
Subject: Re: Simple Feed Bindings Specification [feedsyncsamples:77003]

From: psuthar
Hrishikesh_Dewan wrote:
Is the feedsync.org still working ? It returns 404. Can you update the link ?
Sorry for the downtime - the specs and samples now all exist on this CodePlex site.
Read the full discussion online.
To add a post to this discussion, reply to this email (feedsyncsamples@discussions.codeplex.com)
To start a new discussion for this project, email feedsyncsamples@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com