OpenService Extensions

(Difference between revisions)

Jump to: navigation, search
m (Automatic Discovery)
m (OpenService extension for microformats contexts (a.k.a. microservices))
Line 51: Line 51:
= OpenService extension for microformats contexts (a.k.a. microservices) =
= OpenService extension for microformats contexts (a.k.a. microservices) =
-
This specification extends the original [[http://msdn2.microsoft.com/en-us/library/cc304163(VS.85).aspx|OpenService specification]].
+
This specification extends the original [[http://msdn2.microsoft.com/en-us/library/cc304163(VS.85).aspx | OpenService specification]].
OpenService description includes the concept of context which is used to describe the content this service can be applied to.  The possible contexts included in the original OpenService specification are selection, document and link.  This specification extends that values to include microformats as posible '''contexts'''.  The value used must be the standard microformat name as defined in microformats.org (e.g. hCard, hCalendar, tag).  To indicate a required parent for the microformat a dotted notation can be used (e.g. hCard.addr)
OpenService description includes the concept of context which is used to describe the content this service can be applied to.  The possible contexts included in the original OpenService specification are selection, document and link.  This specification extends that values to include microformats as posible '''contexts'''.  The value used must be the standard microformat name as defined in microformats.org (e.g. hCard, hCalendar, tag).  To indicate a required parent for the microformat a dotted notation can be used (e.g. hCard.addr)
Line 61: Line 61:
** If more than one instance of the properties is found (plural properties), they must be included separated by commas.
** If more than one instance of the properties is found (plural properties), they must be included separated by commas.
-
The variables can be
 
<pre>
<pre>
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>

Revision as of 22:18, 28 April 2008

To increase the value of web content annotated with microformats (or other semantic web technologies) it is required to define a language that can be used by web applications to describe and publish their services available for different semantic contents (e.g. for a hCard).

There could be other alternatives, but one of them is to extend Microsoft [Service Description] and reusing also some [Search] concepts.

Contents

Generic OpenService Extension

mime-type

OpenService description documents are referred to via the following type:

application/openservicedescription+xml

This type is pending IANA registration.

Automatic Discovery

HTML and XHTML documents may reference related OpenService description documents via the HTML 4.0 <link/> element.

The following restrictions apply:

The HTML <head/> element should include a "profile" attribute that contains the value "http://www.microsoft.com/schemas/openservicedescription/1.0". Example of an HTML document that includes OpenSearch autodiscovery link elements:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
   <head profile="http://www.microsoft.com/schemas/openservicedescription/1.0">
     <!--- ... --->
     <link rel="service"
           type="application/openservicedescription+xml" 
           href="http://example.com/service1.xml"
           title="Service 1" />
     <link rel="service"
           type="application/opensearchdescription+xml" 
           href="http://example.com/service2.xml"
           title="Service 2" />
     <!--- ... --->
   </head>
   <body>
     <!--- ... --->
   </body>
 </html>

The "rel" attribute of the link element should contain the value "service" when referring to OpenService description documents. This relationship value is pending IANA registration.

OpenService extension for microformats contexts (a.k.a. microservices)

This specification extends the original [| OpenService specification].

OpenService description includes the concept of context which is used to describe the content this service can be applied to. The possible contexts included in the original OpenService specification are selection, document and link. This specification extends that values to include microformats as posible contexts. The value used must be the standard microformat name as defined in microformats.org (e.g. hCard, hCalendar, tag). To indicate a required parent for the microformat a dotted notation can be used (e.g. hCard.addr)

The other extension required is new variables that can be used to compose the url parameters that will be sent to the service. These new variables include the microformats' properties.

<?xml version="1.0" encoding="utf-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<display>
<name>Find videos on YouTube</name>
<icon>http://www.youtube.com/favicon.ico</icon>
</display>
<homepageUrl>http://youtube.com</homepageUrl>
<activity category="Tags">
<activityAction context="adr">
<execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">
</execute>
</activityAction>
</activity>
</openServiceDescription>

All variables are treated as required unless it the modifier "?". An optional variable that cannot be resolved is treated as an empty string for an inline parameterized URL. In a form-based parameterized URL the entire parameter element is ignored.

Example of an optional variable in an inline parameterized URL:

<execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">

Pending issues:

OpenService extension to describe Operator User Scripts

<?xml version="1.0" encoding="utf-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<display>
<name>Find videos on YouTube</name>
<icon>http://www.youtube.com/favicon.ico</icon>
</display>

<homepageUrl>http://youtube.com</homepageUrl>
<activity category="Tags">
<activityAction context="tag">
<execute method="script">
<script>
<![CDATA[
if (semanticObject.tag) {
return("http://youtube.com/results?search_query=" + encodeURIComponent(semanticObject.tag));
}
]]>
</script>
</execute>
</activityAction>
</activity>

</openServiceDescription>
OpenService Extensions was last modified: Wednesday, December 31st, 1969

Views