Microformats in Cosmo
Cosmo uses XHTML with custom microformats to represent certain kinds of data. These microformats are described with
XMDP profiles. Profiles are referenced in (X)HTML documents in the
head element, e.g.:
<head profile="http://cosmo.osafoundation.org/profiles/local-subscription">
Local Subscriptions
The following is a profile for subscriptions to collections published by other users on the same server as the subscribing user. This profile is available for linking at
http://cosmo.osafoundation.org/profiles/local-subscription.
- local-subscription
- A container for the rest of the class names defined in this profile
- name
- The display name of the subscription
- collection
- A container for class names that describe attributes of the subscribed collection
- uuid
- The UUID of the subscribed collection
- ticket
- A container for class names that describe attributes of the ticket used to access the subscribed collection
- key
- The key of the subscription's ticket
- exists
- A flag indicating whether or not the referenced object (collection or ticket) exists on the server. This is provided so that the client can alert the user when a collection he has subscribed to has been removed or when a ticket he used to subscribe to a collection has been revoked. Valid values are
true and false. It is not meaningful for clients to provide this information when sending representations to the server.
This is an example subscription document:
<div class="local-subscription">
Subscription: <span class="name">Brian's Work Collection</span>
<div class="collection">
Collection: <span class="uuid">df902f4d-f7be-40a4-b603-feccc9d4e59e</span>
Exists? <span class="exists">true</span>
</div>
<div class="ticket">
Ticket: <span class="key">iwygpos1e0</span>
Exists? <span class="exists">true</span>
</div>
</div>
Preferences
The following is a profile for user preferences. This profile is available for linking at
http://cosmo.osafoundation.org/profiles/preference.
- preference
- A container for the rest of the class names defined in this profile
- key
- The preference key. Keys often indicate namespaces by including dots or hyphens (e.g.
Login.Url)
- value
- The preference value
This is an example preference document:
<div class="preference">
Preference: <span class="key">Login.Url</span> = <span class="value">/account/view</span>
</div>
Tickets
The following is a profile for ticket. This profile is available for linking at
http://cosmo.osafoundation.org/profiles/ticket.
- ticket
- A container for the rest of the class names defined in this profile
- key
- The ticket key.
- type
- The ticket type (read/read-write/freebusy)
- timeout
- The ticket timeout(Infinite/{#seconds})
This is an example ticket document:
<div xmlns="http://www.w3.org/1999/xhtml">
<div class="ticket">Key:
<span class="key">bac03f490</span>Type:
<span class="type" title="read-write">read-write</span>Timeout:
<span class="timeout" title="Infinite">Infinite</span>
</div>
</div>
Collection Details
The following is a profile for collection details. This profile is available for linking at
http://cosmo.osafoundation.org/profiles/collection. The collection details profile is meant for representing the aspects of a collection that are directly modifiable by a protocol client. It does not, for instance, describe the members, stamps, or attributes of a collection.
Whereas subscription and preference documents are typically included as content embedded within an Atom entry, collection details documents are served directly to the client. As such, when sent in a server response, a collection details document
SHOULD provide a URI locating the collection resource. By convention, this URI is provided in an
a tag wrapping the
name tag.
- collection
- A container for the rest of the class names defined in this profile
- name
- The collection display name; may be empty or omitted to represent an empty or null display name
- self
- The URI locating the collection resource
This is an example collection document:
<div class="collection">
Collection: <a class="self" href="http://example.org/chandler/atom/collection/7ed1dea4-4513-4b67-9edb-29bdfaea37ac">
<span class="name">Example Collection</span></a>
</div>