OpenService Extensions

(Difference between revisions)

Jump to: navigation, search
(OpenService extension for microformats contexts (a.k.a. microservices))
Line 9: Line 9:
OpenService description documents are referred to via the following type:  
OpenService description documents are referred to via the following type:  
-
application/openservicedescription+xml  
+
'''application/openservicedescription+xml'''
This type is pending IANA registration.  
This type is pending IANA registration.  
Line 15: Line 15:
==Automatic Discovery==
==Automatic Discovery==
-
HTML and XHTML documents may reference related OpenService description documents via the HTML 4.0 <link/> element.  
+
HTML and XHTML documents may reference related OpenService description documents '''via the HTML 4.0 <link/> element'''.  
The following restrictions apply:  
The following restrictions apply:  
Line 60: Line 60:
* The value of the variable must be the value of the microformat's property.   
* The value of the variable must be the value of the microformat's property.   
** If the property is a composed property.... TBD
** If the property is a composed property.... TBD
-
** If more than one instance of the property is found (plural properties), they must be included separated by commas.
+
** If more than one instance of the property are found (plural properties), they must be included separated by commas.
<pre>
<pre>
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
-
<display>
+
  <display>
-
<name>Find videos on YouTube</name>
+
      <name>Find videos on YouTube</name>
-
<icon>http://www.youtube.com/favicon.ico</icon>
+
      <icon>http://www.youtube.com/favicon.ico</icon>
-
</display>
+
  </display>
-
<homepageUrl>http://youtube.com</homepageUrl>
+
  <homepageUrl>http://youtube.com</homepageUrl>
-
<activity category="Tags">
+
  <activity category="Videos">
-
<activityAction context="adr">
+
      <activityAction context="adr">
-
<execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">
+
        <execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">
-
</execute>
+
        </execute>
-
</activityAction>
+
      </activityAction>
-
</activity>
+
  </activity>
</openServiceDescription>
</openServiceDescription>
</pre>
</pre>
Line 83: Line 83:
Example of an optional variable in an inline parameterized URL:
Example of an optional variable in an inline parameterized URL:
<pre>
<pre>
-
<execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">
+
  <execute method="get" action="http://youtube.com/results?search_query={adr.street-address}">
</pre>
</pre>
Line 89: Line 89:
* Include support for services that require more than one microformat.
* Include support for services that require more than one microformat.
* Include support for semantic content other than microformats (RDF, RDFa, eRDF)
* Include support for semantic content other than microformats (RDF, RDFa, eRDF)
-
* Should every identifier be prepended by a "microformat" prefix to avoid collisions (e.g. microformat.hCard.adr)?
+
* Should every identifier be prepended by a "microformat." prefix to avoid collisions (e.g. microformat.hCard.adr)?
= OpenService extension to describe Operator User Scripts =
= OpenService extension to describe Operator User Scripts =
 +
 +
......
<pre>
<pre>
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
-
<display>
+
  <display>
-
<name>Find videos on YouTube</name>
+
      <name>Find videos on YouTube</name>
-
<icon>http://www.youtube.com/favicon.ico</icon>
+
      <icon>http://www.youtube.com/favicon.ico</icon>
-
</display>
+
  </display>
-
 
+
  <homepageUrl>http://youtube.com</homepageUrl>
-
<homepageUrl>http://youtube.com</homepageUrl>
+
  <activity category="Tags">
-
<activity category="Tags">
+
      <activityAction context="tag">
-
<activityAction context="tag">
+
        <execute method="script">
-
<execute method="script">
+
            <script>
-
<script>
+
              <![CDATA[
-
<![CDATA[
+
                  if (semanticObject.tag) {
-
if (semanticObject.tag) {
+
                    return("http://youtube.com/results?search_query=" + encodeURIComponent(semanticObject.tag));
-
return("http://youtube.com/results?search_query=" + encodeURIComponent(semanticObject.tag));
+
                  }
-
}
+
              ]]>
-
]]>
+
            </script>
-
</script>
+
        </execute>
-
</execute>
+
      </activityAction>
-
</activityAction>
+
  </activity>
-
</activity>
+
-
 
+
</openServiceDescription>
</openServiceDescription>
</pre>
</pre>

Revision as of 10:54, 29 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 Open Service Description and reusing also some Open 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 the possible contexts to include microformats. 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.adr indicates an addr content that must be child of a hCard content)

Other required extension 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="Videos">
      <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