Okay/Spec: Difference between revisions

No edit summary
No edit summary
Line 60: Line 60:
A discovery element is a micro-format for informing Okay clients where they should be looking for certain information. They look like this:
A discovery element is a micro-format for informing Okay clients where they should be looking for certain information. They look like this:


<pre>
<syntaxhighlight lang="html">
<nav class=“ok-discover”>
<nav class=“ok-discover”>
   <a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
   <a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
Line 66: Line 66:
   <a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
   <a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
</nav>
</nav>
</pre>
</syntaxhighlight>


The discovery element is defined as any element with the <code>ok-discover</code> class. Any non-void element can be the discovery element, but it really should be a <code>nav</code> if you can help it. The discovery element must contain a number of anchor (<code>a</code>) elements with valid <code>rel</code> and <code>href</code> attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.
The discovery element is defined as any element with the <code>ok-discover</code> class. Any non-void element can be the discovery element, but it really should be a <code>nav</code> if you can help it. The discovery element must contain a number of anchor (<code>a</code>) elements with valid <code>rel</code> and <code>href</code> attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.