Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 64

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="12. Web Application Development" />
  <meta name="dc.subject" content="12. Web Application Development" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="webappdevelopment.html" title="Chapter Contents" />
  <link rel="prev" href="asmxhosting.html" title="ASMX Web Service Hosting" />
  <link rel="next" href="servphpext.html" title="Deploying PHP Applications" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>12. Web Application Development</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="blogger" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>12. Web Application Development</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="webappdevelopment.html">Chapter Contents</a> | <a class="link" href="asmxhosting.html" title="ASMX Web Service Hosting">Prev</a> | <a class="link" href="servphpext.html" title="Deploying PHP Applications">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="webappdevelopment.html">Web Application Development</a>
   </div>
    <br />
   <div>
      <a href="webserver.html">The HTTP Server</a>
   </div>
   <div>
      <a href="wsacl.html">Web Services ACL (Access Control List)</a>
   </div>
   <div>
      <a href="vsp1.html">Virtuoso Server Pages (VSP)</a>
   </div>
   <div>
      <a href="vspx.html">Virtuoso Server Pages for XML (VSPX)</a>
   </div>
   <div>
      <a href="rthwritaspxapps.html">Deploying ASP.Net Web Applications</a>
   </div>
   <div>
      <a href="asmxhosting.html">ASMX Web Service Hosting</a>
   </div>
   <div class="selected">
      <a href="blogger.html">Blogging &amp; Weblogs</a>
    <div>
        <a href="#blogvirtblogapp" title="The Virtuoso Blogging Application">The Virtuoso Blogging Application</a>
        <a href="#bloggerclientcompatibility" title="Blogger Clients Compatibility">Blogger Clients Compatibility</a>
        <a href="#bloggermanagementui" title="Blogs Management User Interface">Blogs Management User Interface</a>
        <a href="#blogcommunityblog" title="Community Blog Site">Community Blog Site</a>
        <a href="#bloggerapi" title="Blogger API">Blogger API</a>
        <a href="#bloggermetaweblog" title="MetaWeblog API">MetaWeblog API</a>
        <a href="#bloggermovabletype" title="Movable Type API">Movable Type API</a>
        <a href="#blogatomapi" title="Atom API">Atom API</a>
        <a href="#bloggerendpointconf" title="XML-RPC Endpoint Configuration">XML-RPC Endpoint Configuration</a>
        <a href="#bloggerhooks" title="Blog Hooks - Customizing the Blog Server">Blog Hooks - Customizing the Blog Server</a>
        <a href="#bloggerclientapi" title="Blogger Client API">Blogger Client API</a>
        <a href="#xmlstoragesystem" title="xmlStorageSystem API">xmlStorageSystem API</a>
        <a href="#xmlstoragesystem" title="User's Blog quota">User&#39;s Blog quota</a>
        <a href="#xmlstoragesystem" title="Posting a message in to the Blog">Posting a message in to the Blog</a>
        <a href="#xmlstoragesystem" title="Multi-author blogging">Multi-author blogging</a>
        <a href="#xmlstoragesystem" title="Posting a comments">Posting a comments</a>
        <a href="#xmlstoragesystem" title="Blog Post Upstreaming (bridging)">Blog Post Upstreaming (bridging)</a>
        <a href="#xmlstoragesystem" title="Weblogs API">Weblogs API</a>
        <a href="#xmlstoragesystem" title="Subscriptions">Subscriptions</a>
        <a href="#xmlstoragesystem" title="Trackback API">Trackback API</a>
        <a href="#xmlstoragesystem" title="Pingback API">Pingback API</a>
        <a href="#xmlstoragesystem" title="E-mail Notifications">E-mail Notifications</a>
        <a href="#blognotifcomments" title="Comments tracking options">Comments tracking options</a>
        <a href="#xmlstoragesystem" title="Subscription Harmonizer API">Subscription Harmonizer API</a>
        <a href="#moblog" title="Mobile Blogging (Moblog)">Mobile Blogging (Moblog)</a>
        <a href="#blogxmltemplate" title="Posting a dynamic content">Posting a dynamic content</a>
        <a href="#blognotifservices" title="Notification Services">Notification Services</a>
        <a href="#blogwaprender" title="Rendering the RSS feed in WML format">Rendering the RSS feed in WML format</a>
    </div>
   </div>
   <div>
      <a href="servphpext.html">Deploying PHP Applications</a>
   </div>
   <div>
      <a href="rthjsp.html">Deploying JSP Applications</a>
   </div>
   <div>
      <a href="perlhosting.html">Perl Hosting</a>
   </div>
   <div>
      <a href="pythonhosting.html">Python Hosting</a>
   </div>
   <div>
      <a href="rubyhosting.html">Ruby Hosting</a>
   </div>
    <br />
  </div>
  <div id="text">
    <a name="blogger" />
    <h2>12.7. Blogging &amp; Weblogs</h2>

<p>Weblogs, or Blog, are web pages or sites organized by date.
The content of a typical blog page contains short messages listed in
chronological order. The blog messages are typically excerpts of HTML markup,
since they typically appear on web sites and expect web browsers as clients.</p>
<p>In the rest of this document we will use interchangeable the terms &quot;blog&quot;
and &quot;weblog&quot;, and refer to the users that have a blog as &quot;bloggers&quot;.</p>
<p>The following terms are also commonly used in this section:</p>

<ul>
      <li>
        <strong>RSS/OCS/OPML/RDF/Atom</strong> - file formats, XML based to represent
  data or list of files containing a data</li>
      <li>
        <strong>Channels</strong> - a public source containing data in any of
  XML/text/HTML format, usually in RSS format.  </li>
      <li>
        <strong>Post/Article(message)</strong> - this is a piece of information
  describing something in a human readable format, in some language. This can be have
  satellite parts as title, excerpt, publication data etc.</li>
      <li>
        <strong>PermaLink</strong> - a URL that uniquely designates a
  single article in blog-space and time.</li>
    </ul>

<p>The Virtuoso Blog system comprises a native Web-based interface
for publishing and blog administration, but can also be interacted with using
an XML-RPC API.  The Virtuoso server supports the following XML-RPC APIs for
blogging purposes:</p>

<ul>
      <li>Blogger API</li>
      <li>MetaWeblog API</li>
      <li>Movable Type</li>
    </ul>

<p>In addition to the blogger APIs Virtuoso supports:</p>

<ul>
      <li>
        <strong>xmlStorageSystem</strong> - this allows blogging clients
  to upload static (ready to go) content onto a Weblog server.</li>
      <li>
        <strong>Weblogs ping API</strong> - to allow cross-server
  notification for the latest updated sites/blogs</li>
      <li>
        <strong>Pingback and Trackback API</strong> - to allow bloggers
  to notify each other.</li>
      <li>
        <strong>Subscription Harmonizer</strong> - to allow bloggers to
  keep their subscriptions in-sync.</li>
    </ul>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>The <a href="">Blogger System Tables</a>
  that are used to keep Weblog data.</p>
    </div>

<div class="tip">
      <div class="tiptitle">See Also: Reference Material on the Internet:</div>
  <p>Blogger API:</p>
  <p>
        <a href="http://xmlrpc.free-conversant.com/docs/bloggerAPI">xmlrpc.free-conversant.com</a>
      </p>
  <p>
        <a href="http://plant.blogger.com/api/index.html">plant.blogger.com</a>
      </p>
  <p>Movable Type API (extensions for blogger API):</p>
  <p>
        <a href="http://www.movabletype.org/docs/mtmanual_programmatic.html">www.movabletype.org</a>
      </p>
  <p>MetaWeblog API (extension of blogger API with RSS2 elements):</p>
  <p>
        <a href="http://www.xmlrpc.com/metaWeblogApi">www.xmlrpc.com</a>
      </p>
  <p>Other:</p>
  <p>
        <a href="http://www.soapware.org/xmlStorageSystem">xmlStorageSystem API (SOAP/XML-RPC based Internet file system)</a>
      </p>
  <p>
        <a href="http://www.opml.org/spec">OPML (Outline Processor Markup Language)</a>
      </p>
  <p>
        <a href="http://internetalchemy.org/ocs/directory.html">OCS (Open Content Syndication directory)</a>
      </p>
</div>

<a name="blogvirtblogapp" />
    <h3>12.7.1. The Virtuoso Blogging Application</h3>

<p>Blogs provide their authors with a location on the Internet or Intranet
to receive their thoughts, experiences, idea, or simply anything they have
a desire to write about.  For this most part, audience is neither expected
nor required, however comments and feedback are common place.  </p>

<p>Blogs originated as a form of public diary.  Their exploitation has seen them
as a useful tool for finding personal reviews to products, situations or
general news as guidance for their readers.  These can be viewed quicker and
more informative than regular journalism.</p>

<p>Corporate blogs, or use of blogging can be a valuable source of company
information propagation.  Members of the company can blog about the activities
or findings with no particular audience in mind.  This provides a continual
journal or account of the company&#39;s undertakings that is really
self-documenting for every other employee how they fit into the overall
picture.  Over time a searchable knowledge base will unravel itself, people
may need information about a product or some aspect of internal support that
took place possibly years prior, otherwise forgotten, stored within the blog.</p>

<p>Virtuoso implements the three major APIs for blogging which makes instantly
attractive to any standard blog application.  Virtuoso provides blog authoring
applications of its own.  On a personal level, your blogs can be stored or
exposed using the most appropriate server, authored using the most appealing
client and everything held in right places by Virtuoso.  On a community level
you get the same but scaled upwards for each member individually,
and further more, centrally.  Virtuoso can generate and automatically maintain
a blog site specially for blog collaboration within a community suitable
for a corporate need.  All members are listed on the front page and have
the opportunity to contribute (publish) to the main blog view.  All blogs
are fully free text searchable - a simple exploit of the Virtuoso
free-text engine. </p>

<p>Virtuoso can provide the blog client, server or relay for blogs or any
RSS or XML-feed based channel or information.</p>

        <table class="figure" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td>
          <img alt="Virtuoso Blogging Conceptual Diagram" src="../images/VirtuosoBlog.jpg" />
     </td>
    </tr>
    <tr>
        <td>Figure: 12.7.1.1. Virtuoso Blogging Conceptual Diagram</td>
    </tr>
    </table>

<a name="blogsyndicateyourblog" />
    <h4>12.7.1.2. Syndication to your Blog - RSS &amp; RDF</h4>

<p>The default Virtuoso blog implementation maintains a &quot;blog/gems&quot; subdirectory
for each blog account.  Within this is an RDF file and an RSS file.
These provide direct access to the blog information in XML.  Other
bloggers or news syndicators can read just the site contents, apart from
the web interface that Virtuoso provides, potentially applying an
XSLT transformations suitable to their application or circumstance, for
example reading the blog from a PDA or mobile device.</p>

<p>Rich Site Summary (RSS) is a lightweight XML format designed for
sharing headlines and other Web content. Think of it as a distributable
&quot;What&#39;s New&quot; for your site.  Each RSS text file contains both static
information about your site, plus dynamic information about your new blog
entries.  Each entry is defined by an &lt;item&gt; tag, which contains a
headline TITLE, URL, and DESCRIPTION. For example: </p>

<div>
      <pre class="programlisting">
...
&lt;item&gt;
  &lt;title&gt;RSS Resources&lt;/title&gt;
  &lt;link&gt;http://www.webreference.com/authoring/languages/xml/rss/&lt;/link&gt;
  &lt;description&gt;Defined in XML, the Rich Site Summary (RSS) format has
  quietly become a dominant format for distributing headlines on the Web.
  Our list of links gives you the tools, tips and tutorials you need to get
  started using RSS. 0323&lt;/description&gt;
&lt;/item&gt;
...
</pre>
    </div>

<p>The Resource Description Framework (RDF) integrates a variety of
applications from library catalogs and world-wide directories to syndication
and aggregation of news, software, and content to personal collections
of music, photos, and events using XML as an interchange syntax.  The
RDF specifications provide a lightweight ontology system to support the
exchange of knowledge on the Web. </p>
<br />

<a name="blogchannels" />
    <h4>12.7.1.3. Channels - OCS &amp; OPML</h4>

<p>The default Virtuoso blog implementation maintains a &quot;blog/gems&quot; subdirectory
for each blog account.  Within this are an OCS file and an OPML file.
Both files provide an outline or hierarchical list of RSS feeds
linked to the blog account in these two popular formats designed for
channel/list exchange.  The files are variably accessible following:</p>

<div>
      <pre class="programlisting">
http://virtserv/DAV/myaccount/blog/gems/index.ocs
http://virtserv/DAV/myaccount/blog/gems/index.opml
</pre>
    </div>

<p>Open Content Syndication (OCS), an application of XML, is an
RDF description of all external RSS feeds linked to the blog site.  </p>

<p>The OCS Directory format is designed to enable channel listings to
be constructed for use by portal sites, client based headline software
and other similar applications.</p>

<p>Outline Processor Markup Language (OPML) is a very simple XML
format for storing information in outline format.  XML being
inherently hierarchical, OPML constrains XML so that a wide
variety of applications can build in OPML support with the
comfort of knowing it will work with any other OPML tool.
Type of information stored in such hierarchies are web browser
bookmarks, web directories, collaborative outlines, song playlists,
and even web-site content, OPML is a great balance between the
wide open freedom of raw XML and the feeling of security of a
formal vocabulary.</p>

<p>The OCS RDF file is an XML of nested &lt;rdf:descriptions&gt; tags
loosely defined as follows:</p>

<div>
      <pre class="programlisting">
&lt;rdf:RDF&gt;
  &lt;rdf:description&gt;
      This contains a description of this RDF originator
    &lt;rdf:description&gt;
        Description of a link RSS blog or news feed
       &lt;rdf:description&gt;
         Description of the URL containing the above described
         RSS feed and details about its format, update frequency
         and when the link for established.
       &lt;/rdf:description&gt;
    &lt;/rdf:description&gt;
      more RSS descriptions may follow, one for each
      linked.
  &lt;/rdf:description&gt;
&lt;/rdf:RDF&gt;
</pre>
    </div>

<p>Here is an example of the contents of the index.ocs file describing
a single linked RSS news feed.</p>

<div>
      <pre class="programlisting">
&lt;rdf:RDF
    xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
    xmlns:ocs=&quot;http://InternetAlchemy.org/ocs/directory#&quot;
    xmlns:dc=&quot;http://purl.org/metadata/dublin_core#&quot;&gt;
  &lt;rdf:description about=&quot;&quot;&gt;
  &lt;dc:title&gt;My Blog&lt;/dc:title&gt;
  &lt;dc:creator&gt;blog@openlinksw.com&lt;/dc:creator&gt;
  &lt;dc:description /&gt;
  &lt;rdf:description about=&quot;http://msdn.microsoft.com/&quot;&gt;
    &lt;dc:title&gt;MSDN Just Published&lt;/dc:title&gt;
    &lt;dc:creator /&gt;
    &lt;dc:description /&gt;
    &lt;dc:subject /&gt;
    &lt;dc:image /&gt;
    &lt;rdf:description about=&quot;http://msdn.microsoft.com/rss.xml&quot;&gt;
      &lt;dc:language&gt;us-en&lt;/dc:language&gt;
      &lt;ocs:format /&gt;
      &lt;ocs:updatePeriod&gt;hourly&lt;/ocs:updatePeriod&gt;
      &lt;ocs:updateFrequency&gt;1&lt;/ocs:updateFrequency&gt;
      &lt;ocs:updateBase&gt;1999-05-30T00:00&lt;/ocs:updateBase&gt;
    &lt;/rdf:description&gt;
  &lt;/rdf:description&gt;
&lt;/rdf:RDF&gt;
</pre>
    </div>

<p>The OPML file is more simple, the corresponding index.opml would be
as follows:</p>

<div>
      <pre class="programlisting">
&lt;opml&gt;
  &lt;body&gt;
    &lt;outline
      title=&quot;MSDN Just Published&quot;
      htmlUrl=&quot;http://msdn.microsoft.com/&quot;
      xmlUrl=&quot;http://msdn.microsoft.com/rss.xml&quot; /&gt;
    more outline tags for each description...
  &lt;/body&gt;
&lt;/opml&gt;
</pre>
    </div>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>
        <a href="http://internetalchemy.org/">internetalchemy.org</a>
      </p>
  <p>
        <a href="http://www.opml.org/">www.opml.org</a>
      </p>
    </div>
<br />

<a name="blogpersonalblog" />
    <h4>12.7.1.4. Personal Blog Sites</h4>

<p>Every WebDAV account with a home directory has the option to create a
default personal blog site.  The default blog pages contains a call to
a function that produces XML data containing a list of messages, calendar
for archive navigation and channels that the owner has subscribed to.
This blog directory and pages are generated upon initial sign-in of the
user. Each WebDAV account with a blog directory will thus have the following:</p>

<div>
      <pre class="programlisting">
http://&lt;host:port&gt;/DAV/&lt;uname&gt;/blog/
</pre>
    </div>

<p>containing the following:</p>

  <ul>
      <li>
        <strong>index.vspx</strong> - The default blog home page using VSPX controls.</li>
      <li>
        <strong>gems/rss.xml</strong> - The RSS v2.0 file presenting the user&#39;s blog data.</li>
      <li>
        <strong>gems/rss92.xml</strong> - The RSS v0.92 file presenting the user&#39;s blog data.</li>
      <li>
        <strong>gems/rss91.xml</strong> - The RSS v0.91 file presenting the user&#39;s blog data.</li>
      <li>
        <strong>gems/index.rdf</strong> - the user&#39;s blog data in RDF format.</li>
      <li>
        <strong>gems/index.ocs</strong> - the user&#39;s channels represented in OCS format.</li>
      <li>
        <strong>gems/rsd.xml</strong> - Really Simple Discovery file for the blog. This helps client software to find the services needed to read, edit, post etc.</li>
      <li>
        <strong>gems/atom.xml</strong> - Atom feed file. It&#39;s similar to the RSS file but in different format.</li>
      <li>
        <strong>gems/backlog.xml</strong> - RSS v2.0 file containing all posts in user&#39;s blog.</li>
      <li>
        <strong>gems/foaf.xml</strong> - &#39;Friend Of Friend&#39; file. This is to provide in a machine-processable format, about blogger, his/she interests, location, friends etc.</li>
      <li>
        <strong>gems/index.opml</strong> - the user&#39;s channels represented in OPML format.</li>
      <li>
        <strong>gems/ocs.xml</strong> - the user&#39;s channels represented in OCS format.</li>
      <li>
        <strong>gems/opml.xml</strong> - the user&#39;s channels represented in OPML format.</li>
      <li>
        <strong>comments.vsp</strong> - a VSP page for posting a comment to the user&#39;s blog.</li>
      <li>
        <strong>default.xsl</strong> - an XSL-T style sheet providing the default HTML view of the blog XML data.</li>
      <li>
        <strong>comments.vsp</strong> - pop-up for blog comments (obsoleted)</li>
      <li>
        <strong>default.css</strong>  - CSS for pages</li>
      <li>
        <strong>main.xsl</strong> - VSPX controls for index.vspx</li>
      <li>
        <strong>calendar.xsl</strong> - calendar control</li>
      <li>
        <strong>trackback.xsl</strong> - pop-up for trackbacks (obsoleted)</li>
      <li>
        <strong>rss_feeds/</strong> - folder containing channel RSS feeds in XML format </li>
    </ul>

  <p>The <span class="computeroutput">rss.xml</span>, <span class="computeroutput">index.rdf</span>,
  <span class="computeroutput">index.ocs</span> files are dynamic SQL-XML resources,
  they are not static files and must not be deleted.  Their content is
  generated in real-time per request.</p>

  <p>Blog users may edit the <span class="computeroutput">default.xsl</span> in
  order to change the appearance of the default page of their Blog.</p>

<a name="ex_defaultbloghome" />
    <div class="example">
      <div class="exampletitle">Default blog home (index.vspx) page</div>
<p>The following is source of default blog home page. It&#39;s built using a VSPX and macro expansion.
All page components are represented with &lt;vm:* /&gt; this makes page more simpler and allows users to
change it&#39;s appearance using custom VSPX components.
</p>
<div>
        <pre class="programlisting">
&lt;v:page xmlns:vm=&quot;http://www.openlinksw.com/vspx/weblog/&quot;
  xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;
  style=&quot;main.xsl&quot; name=&quot;blog-home-page&quot;
  doctype=&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
  doctype-system=&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  &lt;vm:page id=&quot;&lt;UID&gt;&quot;&gt;
    &lt;vm:header&gt;
      &lt;vm:title/&gt;
      &lt;vm:disco-rss-link/&gt;
      &lt;vm:disco-pingback-link/&gt;
      &lt;vm:meta-author/&gt;
      &lt;vm:meta-description/&gt;
      &lt;vm:meta-keywords/&gt;
      &lt;vm:style url=&quot;default.css&quot; /&gt;
    &lt;/vm:header&gt;
    &lt;vm:body&gt;
      &lt;div id=&quot;header&quot;&gt;
        &lt;img src=&quot;/blog/blogs/images/bloglogo.jpg&quot; alt=&quot;OpenLink Virtuoso Blog&quot;/&gt;
        &lt;h1&gt;&lt;vm:blog-title/&gt;&lt;/h1&gt;
        &lt;h2&gt;&lt;vm:blog-about/&gt;&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div id=&quot;navbartop&quot;&gt;
        &lt;div&gt;Entries: [ &lt;vm:entry-list /&gt; ]&lt;/div&gt;
      &lt;/div&gt;
      &lt;table id=&quot;pagecontainer&quot; cellspacing=&quot;10&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;
        &lt;tr&gt;
          &lt;td class=&quot;box&quot;&gt;
	     &lt;div class=&quot;box&quot;&gt;
                  &lt;div class=&quot;roll&quot; style=&quot;border: none; border&quot;&gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;Personal Details&lt;/b&gt;
                    &lt;/div&gt;
		    &lt;div style=&quot;margin-bottom: 3px;&quot;&gt;&lt;vm:site-home&gt;Home&lt;/vm:site-home&gt;&lt;/div&gt;
		    &lt;vm:if test=&quot;contact&quot;&gt;
                    &lt;div&gt;
		      &lt;vm:e-mail&gt; Contact&lt;/vm:e-mail&gt;
		    &lt;/div&gt;
		    &lt;/vm:if&gt;
		    &lt;div&gt;
		      &lt;vm:photo width=&quot;64&quot; /&gt;
		    &lt;/div&gt;
                  &lt;/div&gt;
		  &lt;vm:if test=&quot;login&quot;&gt;
                  &lt;div class=&quot;roll&quot; &gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;Configuration&lt;/b&gt;
                    &lt;/div&gt;
                    &lt;vm:configpages /&gt;
                  &lt;/div&gt;
		  &lt;/vm:if&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                  &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                    &lt;b&gt;Syndicate This Blog&lt;/b&gt;
                  &lt;/div&gt;
                    &lt;vm:rss-link/&gt;
                    &lt;vm:rdf-link/&gt;
                    &lt;vm:ocs-link/&gt;
                    &lt;vm:opml-link/&gt;
                  &lt;/div&gt;
                  &lt;div align=&quot;left&quot; class=&quot;roll&quot;&gt;
                    &lt;p class=&quot;caption&quot;&gt;Keyword search:&lt;/p&gt;
                    &lt;vm:search/&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;Post Categories&lt;/b&gt;
                    &lt;/div&gt;
		    &lt;vm:login /&gt;
                    &lt;vm:categories/&gt;
                  &lt;/div&gt;
		&lt;vm:if test=&quot;subscribe&quot;&gt;
                &lt;div align=&quot;left&quot; class=&quot;roll&quot;&gt;
                  &lt;p class=&quot;caption&quot;&gt;Subscribe&lt;/p&gt;
		  &lt;vm:subscribe/&gt;
		&lt;/div&gt;
		&lt;/vm:if&gt;
		&lt;div align=&quot;left&quot; class=&quot;roll&quot;&gt;
		   &lt;vm:last-messages /&gt;
		&lt;/div&gt;
	      &lt;/div&gt;
          &lt;/td&gt;
          &lt;td id=&quot;texttd&quot;&gt;
	     &lt;div id=&quot;text&quot;&gt;
	          &lt;vm:post-form /&gt;
                  &lt;vm:posts trackback=&quot;discovery&quot; /&gt;
		  &lt;vm:if test=&quot;comments&quot;&gt;
		  &lt;vm:comments-view&gt;
		    &lt;vm:trackbacks /&gt;
		    &lt;vm:comments /&gt;
		    &lt;vm:post-comment /&gt;
		  &lt;/vm:comments-view&gt;
		  &lt;/vm:if&gt;
             &lt;/div&gt;
          &lt;/td&gt;
          &lt;td class=&quot;box&quot;&gt;
	    &lt;div class=&quot;box&quot;&gt;
                  &lt;vm:calendar/&gt;
		  &lt;vm:if test=&quot;blog&quot;&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                    &lt;div align=&quot;center&quot;&gt;
                      &lt;b&gt;Blog Roll&lt;/b&gt;
                    &lt;/div&gt;
                    &lt;vm:rss/&gt;
                  &lt;/div&gt;
		  &lt;/vm:if&gt;
		  &lt;vm:if test=&quot;channels&quot;&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                    &lt;div align=&quot;center&quot;&gt;
                      &lt;b&gt;Channel Roll&lt;/b&gt;
                    &lt;/div&gt;
                    &lt;vm:channels/&gt;
                  &lt;/div&gt;
		  &lt;/vm:if&gt;
		  &lt;vm:if test=&quot;ocs&quot;&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;OCS Links&lt;/b&gt;
                    &lt;/div&gt;
                    &lt;vm:ocs/&gt;
                  &lt;/div&gt;
		  &lt;/vm:if&gt;
		  &lt;vm:if test=&quot;opml&quot;&gt;
                  &lt;div class=&quot;roll&quot;&gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;OPML Links&lt;/b&gt;
                    &lt;/div&gt;
                    &lt;vm:opml/&gt;
                  &lt;/div&gt;
		  &lt;/vm:if&gt;
	      &lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;div id=&quot;powered&quot;&gt;
        &lt;vm:powered-by/&gt;
      &lt;/div&gt;
      &lt;div class=&quot;disclaimer&quot;&gt;
      &lt;vm:disclaimer/&gt;
        &lt;/div&gt;
      &lt;div class=&quot;copy&quot;&gt;
        &lt;vm:copyright/&gt;
      &lt;/div&gt;
    &lt;/vm:body&gt;
  &lt;/vm:page&gt;
&lt;/v:page&gt;

</pre>
      </div>
</div>

<a name="ex_bloghome" />
    <div class="example">
      <div class="exampletitle">Blog home (index.vsp) page</div>

<p>The XML Schema representing the XML data for blog home page is represented below.
Following this fragment is the <span class="computeroutput">default.xsl</span> XSL
style sheet that would be used to transform XML document valid to this into the default web page for public
consumption on the Internet or Intranet.</p>

<div>
        <pre class="programlisting">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
  &lt;xs:element name=&quot;about&quot;&gt;
    &lt;xs:complexType/&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;blog&quot;&gt;
    &lt;xs:complexType mixed=&quot;true&quot;&gt;
      &lt;xs:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
        &lt;xs:element ref=&quot;title&quot;/&gt;
        &lt;xs:element ref=&quot;about&quot;/&gt;
        &lt;xs:element ref=&quot;email&quot;/&gt;
        &lt;xs:element ref=&quot;items&quot;/&gt;
        &lt;xs:element ref=&quot;navigation&quot;/&gt;
        &lt;xs:element ref=&quot;copy&quot;/&gt;
        &lt;xs:element ref=&quot;disclaimer&quot;/&gt;
      &lt;/xs:choice&gt;
      &lt;xs:attribute name=&quot;base&quot; type=&quot;xs:anyURI&quot;/&gt;
      &lt;xs:attribute name=&quot;category&quot; type=&quot;xs:string&quot;/&gt;
      &lt;xs:attribute name=&quot;category-name&quot; type=&quot;xs:string&quot;/&gt;
      &lt;xs:attribute name=&quot;post&quot; type=&quot;xs:string&quot;/&gt;
      &lt;xs:attribute name=&quot;trackback-url&quot; type=&quot;xs:anyURI&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;blogroll&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;link&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;id&quot; type=&quot;xs:boolean&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;calendar&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;week&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;monthname&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;year&quot; type=&quot;xs:short&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;month&quot; type=&quot;xs:byte&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;day&quot; type=&quot;xs:byte&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;prev&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;prev-label&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;next&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;next-label&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;categories&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;category&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;category&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:attribute name=&quot;id&quot; use=&quot;required&quot; type=&quot;xs:NMTOKEN&quot; /&gt;
      &lt;xs:attribute name=&quot;name&quot; use=&quot;required&quot; type=&quot;xs:string&quot; /&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;comments&quot; type=&quot;xs:boolean&quot;/&gt;
  &lt;xs:element name=&quot;copy&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;day&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:simpleContent&gt;
        &lt;xs:extension base=&quot;xs:string&quot;&gt;
          &lt;xs:attribute name=&quot;active&quot; use=&quot;required&quot;&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:NMTOKEN&quot;&gt;
                &lt;xs:enumeration value=&quot;0&quot;/&gt;
                &lt;xs:enumeration value=&quot;1&quot;/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;description&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;disclaimer&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;email&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;id&quot; type=&quot;xs:string&quot; /&gt;
  &lt;xs:element name=&quot;item&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;description&quot;/&gt;
        &lt;xs:element ref=&quot;pubDate&quot;/&gt;
        &lt;xs:element ref=&quot;id&quot;/&gt;
        &lt;xs:element ref=&quot;comments&quot;/&gt;
        &lt;xs:element ref=&quot;trackbacks&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;items&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;item&quot; maxOccurs=&quot;unbounded&quot;/&gt;
        &lt;xs:element ref=&quot;last&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;search&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;last&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;message&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;link&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;blog&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;href&quot; type=&quot;xs:anyURI&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;rss&quot; type=&quot;xs:anyURI&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;message&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;id&quot;/&gt;
        &lt;xs:element ref=&quot;title&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;navigation&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;calendar&quot;/&gt;
        &lt;xs:element ref=&quot;blogroll&quot;/&gt;
        &lt;xs:element ref=&quot;categories&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;pubDate&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;title&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:simpleContent&gt;
        &lt;xs:extension base=&quot;xs:string&quot;&gt;
          &lt;xs:attribute name=&quot;blogid&quot; type=&quot;xs:byte&quot;/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:simpleContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;trackbacks&quot; type=&quot;xs:boolean&quot;/&gt;
  &lt;xs:element name=&quot;week&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;day&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre>
      </div>

<p>The XML data as following XML Schema above will be transformed using the following XSL-T style sheet, default.xsl:</p>
<div>
        <pre class="programlisting">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
  version=&quot;1.0&quot;
    xmlns:vb=&quot;http://www.openlinksw.com/weblog/&quot;
    xmlns:vtb=&quot;http://www.openlinksw.com/weblog/tb/&quot; &gt;
  &lt;xsl:output method=&quot;xml&quot; doctype-public=&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
    doctype-system=&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;
	indent=&quot;yes&quot; encoding=&quot;UTF-8&quot; omit-xml-declaration=&quot;yes&quot; media-type=&quot;text/html&quot;/&gt;
  &lt;xsl:template match=&quot;/&quot;&gt;
    &lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;
          &lt;xsl:value-of select=&quot;//title[1]&quot;/&gt;
        &lt;/title&gt;
        &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS&quot; href=&quot;{/blog/@base}gems/rss.xml&quot;/&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;default.css&quot;/&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;div id=&quot;header&quot;&gt;
          &lt;img src=&quot;/blog/blogs/images/bloglogo.jpg&quot; alt=&quot;OpenLink Virtuoso Blog&quot;/&gt;
          &lt;h1&gt;
            &lt;xsl:value-of select=&quot;/blog/title&quot;/&gt;
          &lt;/h1&gt;
	  &lt;xsl:if test=&quot;/blog/about != &#39;&#39;&quot;&gt;
          &lt;h2&gt;&lt;xsl:value-of select=&quot;/blog/about&quot;/&gt;&lt;/h2&gt;
          &lt;/xsl:if&gt;
        &lt;/div&gt;
        &lt;div id=&quot;navbartop&quot;&gt;
          &lt;div&gt;Entries: [ &lt;xsl:call-template name=&quot;entrylist&quot;/&gt; ]&lt;/div&gt;
        &lt;/div&gt;
        &lt;table id=&quot;pagecontainer&quot; cellspacing=&quot;10&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;
          &lt;tr&gt;
            &lt;td class=&quot;box&quot;&gt;
              &lt;div class=&quot;box&quot;&gt;
                &lt;div align=&quot;left&quot; class=&quot;roll&quot; style=&quot;border: none; border&quot;&gt;
                    &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                      &lt;b&gt;Personal Details&lt;/b&gt;
                    &lt;/div&gt;
		  &lt;div&gt;
                  &lt;a&gt;
 		    &lt;xsl:attribute name=&quot;href&quot;&gt;mailto:&lt;xsl:value-of select=&quot;/blog/email&quot; /&gt;&lt;/xsl:attribute&gt;
 		  &lt;img src=&quot;/blog/blogs/images/mailto.gif&quot; border=&quot;0&quot; alt=&quot;mailto&quot;/&gt;
		  &lt;/a&gt; Contact
 		  &lt;/div&gt;
		&lt;/div&gt;
                &lt;div class=&quot;roll&quot;&gt;
                  &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
                    &lt;b&gt;Syndicate This Blog&lt;/b&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                    &lt;a href=&quot;gems/rss.xml&quot;&gt;
                      &lt;img src=&quot;/blog/blogs/images/xml.gif&quot; border=&quot;0&quot; alt=&quot;rss&quot;/&gt;
                      RSS&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                    &lt;a href=&quot;gems/index.rdf&quot;&gt;
                      &lt;img src=&quot;/blog/blogs/images/rdf48.gif&quot; border=&quot;0&quot; alt=&quot;rdf&quot;/&gt;
                      RDF&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                    &lt;a href=&quot;gems/index.ocs&quot;&gt;&lt;img src=&quot;/blog/blogs/images/xml.gif&quot; border=&quot;0&quot; alt=&quot;ocs&quot;/&gt;OCS&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                    &lt;a href=&quot;gems/index.opml&quot;&gt;&lt;img src=&quot;/blog/blogs/images/xml.gif&quot; border=&quot;0&quot; alt=&quot;opml&quot;/&gt;OPML&lt;/a&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div align=&quot;left&quot; class=&quot;roll&quot;&gt;
                  &lt;p class=&quot;caption&quot;&gt;Keyword search&lt;/p&gt;
                  &lt;form method=&quot;post&quot; action=&quot;index.vsp&quot;&gt;
                    &lt;div&gt;
                      &lt;input type=&quot;text&quot; name=&quot;txt&quot; value=&quot;&quot; size=&quot;10&quot;/&gt;
                      &lt;input type=&quot;submit&quot; name=&quot;GO&quot; value=&quot;GO&quot;/&gt;
                    &lt;/div&gt;
                    &lt;div&gt;
                      &lt;input type=&quot;radio&quot; name=&quot;srch_where&quot; value=&quot;blog&quot; checked=&quot;checked&quot;/&gt;&amp;#160;My Blog&lt;/div&gt;
                    &lt;div&gt;
                      &lt;input type=&quot;radio&quot; name=&quot;srch_where&quot; value=&quot;web&quot;/&gt;&amp;#160;The Web&lt;/div&gt;
                  &lt;/form&gt;
                &lt;/div&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/categories&quot;/&gt;
                &lt;div align=&quot;left&quot; class=&quot;roll&quot;&gt;
 		  &lt;xsl:for-each select=&quot;/blog/items/last/message&quot;&gt;
 		    &lt;div&gt;
		      &lt;a&gt;
                        &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?id=&lt;xsl:value-of select=&quot;id&quot; /&gt;&lt;/xsl:attribute&gt;
	   		&lt;xsl:value-of select=&quot;title&quot; /&gt;
		      &lt;/a&gt;
 		    &lt;/div&gt;
 		  &lt;/xsl:for-each&gt;
 		&lt;/div&gt;
              &lt;/div&gt;
            &lt;/td&gt;
            &lt;td id=&quot;texttd&quot;&gt;
              &lt;xsl:apply-templates select=&quot;/blog/items&quot;/&gt;
            &lt;/td&gt;
            &lt;td class=&quot;box&quot;&gt;
              &lt;div class=&quot;box&quot;&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/calendar&quot;/&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/blogroll&quot;/&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/channelroll&quot;/&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/ocs&quot;/&gt;
                &lt;xsl:apply-templates select=&quot;/blog/navigation/opml&quot;/&gt;
              &lt;/div&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;title|navigation&quot;/&gt;
  &lt;xsl:template name=&quot;entrylist&quot;&gt;
    &lt;xsl:for-each select=&quot;/blog/items/item&quot;&gt;
      &lt;a href=&quot;#{id}&quot;&gt;
        &lt;xsl:number level=&quot;multiple&quot; format=&quot; 1 &quot; count=&quot;item&quot;/&gt;
      &lt;/a&gt;
      &lt;xsl:if test=&quot;following-sibling::item&quot;&gt; | &lt;/xsl:if&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;items&quot;&gt;
    &lt;div id=&quot;text&quot;&gt;
      &lt;xsl:if test=&quot;/blog/@category-name != &#39;&#39;&quot;&gt;
        &lt;h3&gt;Category: &quot;&lt;xsl:value-of select=&quot;/blog/@category-name&quot;/&gt;&quot;&lt;/h3&gt;
      &lt;/xsl:if&gt;
      &lt;xsl:apply-templates select=&quot;item&quot;/&gt;
      &lt;xsl:if test=&quot;/blog/@post != &#39;&#39;&quot;&gt;
      &lt;div&gt;&lt;a name=&quot;tb&quot; /&gt;&lt;h3&gt;TrackBacks&lt;/h3&gt;
      &lt;div class=&quot;tb-url&quot;&gt;TrackBack URL for this entry:&lt;br/&gt;&lt;b&gt;&lt;xsl:value-of select=&quot;/blog/@trackback-url&quot;/&gt;&lt;xsl:value-of select=&quot;/blog/@post&quot;/&gt;&lt;/b&gt;&lt;br /&gt;
      PingBack URL for this entry:&lt;br/&gt;
      &lt;b&gt;&lt;xsl:value-of select=&quot;/blog/@pingback-url&quot;/&gt;&lt;/b&gt;
      &lt;/div&gt;
      &lt;xsl:apply-templates select=&quot;trackbacks&quot;/&gt;
      &lt;/div&gt;
      &lt;div&gt;&lt;a name=&quot;comments&quot; /&gt;&lt;h3&gt;Comments&lt;/h3&gt;
      &lt;xsl:if test=&quot;not post-comments&quot;&gt;
      &lt;div&gt;No comments posted yet&lt;/div&gt;
      &lt;/xsl:if&gt;
      &lt;xsl:apply-templates select=&quot;post-comments&quot;/&gt;
      &lt;div&gt;
        &lt;form method=&quot;post&quot; action=&quot;index.vsp&quot;&gt;
        &lt;input type=&quot;hidden&quot; name=&quot;id&quot;&gt;
	    &lt;xsl:attribute name=&quot;value&quot;&gt;&lt;xsl:value-of select=&quot;/blog/@post&quot; /&gt;&lt;/xsl:attribute&gt;
        &lt;/input&gt;
	&lt;table border=&quot;0&quot;&gt;
        &lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot; size=&quot;50&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;Email&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot;  size=&quot;50&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;Web Site&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;url&quot; value=&quot;&quot;  size=&quot;50&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;Comment&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;textarea name=&quot;comment&quot; rows=&quot;15&quot; cols=&quot;50&quot;&gt;&amp;#160;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;
        &lt;/form&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/xsl:if&gt;
      &lt;xsl:choose&gt;
        &lt;xsl:when test=&quot;not item and @search != &#39;&#39;&quot;&gt;
  No messages found containing &quot;&lt;xsl:value-of select=&quot;@search&quot;/&gt;&quot;.
  &lt;/xsl:when&gt;
        &lt;xsl:when test=&quot;not item and /blog/@category != &#39;&#39;&quot;&gt;
  No messages found for category  &quot;&lt;xsl:value-of select=&quot;/blog/@category-name&quot;/&gt;&quot;.
  &lt;/xsl:when&gt;
        &lt;xsl:when test=&quot;not item and @search = &#39;&#39; and /blog/@cat = &#39;&#39;&quot;&gt;
          &lt;div class=&quot;message&quot;&gt;
  This is a placeholder for your new weblog.
  There are no posts currently.
  &lt;/div&gt;
        &lt;/xsl:when&gt;
      &lt;/xsl:choose&gt;
      &lt;div id=&quot;powered&quot;&gt;
        &lt;a href=&quot;http://www.openlinksw.com/virtuoso&quot;&gt;
          &lt;img src=&quot;/blog/blogs/images/PoweredByVirtuoso.gif&quot; border=&quot;0&quot; alt=&quot;powered by&quot; /&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class=&quot;disclaimer&quot;&gt;
        &lt;xsl:value-of  select=&quot;/blog/disclaimer&quot; disable-output-escaping=&quot;yes&quot; /&gt;
      &lt;/div&gt;
      &lt;div class=&quot;copy&quot;&gt;
        &lt;xsl:value-of select=&quot;/blog/copy&quot; disable-output-escaping=&quot;yes&quot; /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;item&quot;&gt;
    &lt;a name=&quot;{id}&quot;/&gt;
    &lt;div class=&quot;message&quot;&gt;
      &lt;xsl:apply-templates select=&quot;pubDate&quot;/&gt;
      &lt;xsl:apply-templates select=&quot;description&quot;/&gt;
      &lt;xsl:if test=&quot;function-available(&#39;vb:mt_track_back_discovery&#39;)&quot;&gt;
	&lt;xsl:value-of select=&quot;vb:mt_track_back_discovery (id)&quot; disable-output-escaping=&quot;yes&quot; /&gt;
      &lt;/xsl:if&gt;
      &lt;div class=&quot;comment&quot;&gt;
        &lt;a href=&quot;#&quot;&gt;
	  &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?id=&lt;xsl:value-of select=&quot;id&quot;/&gt;#comments&lt;/xsl:attribute&gt;
	Comments [&lt;xsl:value-of select=&quot;comments&quot;/&gt;]
   &lt;/a&gt; | &lt;a href=&quot;#&quot;&gt;
	  &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?id=&lt;xsl:value-of select=&quot;id&quot;/&gt;#tb&lt;/xsl:attribute&gt;
 	TrackBack [&lt;xsl:value-of select=&quot;trackbacks&quot;/&gt;]
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;post-comments&quot;&gt;
    &lt;div class=&quot;message&quot;&gt;
      &lt;xsl:apply-templates select=&quot;posted&quot;/&gt;
      &lt;a&gt;&lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;home&quot;/&gt;&lt;/xsl:attribute&gt;&lt;b&gt;&lt;xsl:apply-templates select=&quot;name&quot;/&gt;&lt;/b&gt;&lt;/a&gt;
      &lt;div class=&quot;desc&quot;&gt;
        &lt;xsl:value-of select=&quot;vb:tidy_xhtml (comment, &#39;*default*&#39;)&quot; disable-output-escaping=&quot;yes&quot;/&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;trackbacks&quot;&gt;
    &lt;div class=&quot;message&quot;&gt;
      &lt;xsl:apply-templates select=&quot;posted&quot;/&gt;
      &lt;a&gt;&lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;url&quot;/&gt;&lt;/xsl:attribute&gt;&lt;b&gt;&lt;xsl:apply-templates select=&quot;blog-name&quot;/&gt;&lt;/b&gt;&lt;/a&gt;
      &lt;div class=&quot;desc&quot;&gt;
      &lt;b&gt;&lt;xsl:apply-templates select=&quot;title&quot;/&gt;&lt;/b&gt;
        &lt;xsl:value-of select=&quot;vb:tidy_xhtml (excerpt, &#39;*default*&#39;)&quot; disable-output-escaping=&quot;yes&quot;/&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;description&quot;&gt;
    &lt;div class=&quot;desc&quot;&gt;
      &lt;xsl:choose&gt;
      &lt;xsl:when test=&quot;function-available(&#39;vb:tidy_xhtml&#39;)&quot;&gt;
        &lt;xsl:value-of select=&quot;vb:tidy_xhtml (., &#39;*default*&#39;)&quot; disable-output-escaping=&quot;yes&quot;/&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
        &lt;xsl:value-of select=&quot;.&quot; disable-output-escaping=&quot;yes&quot;/&gt;
      &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;pubDate&quot;&gt;
    &lt;div class=&quot;pubdate&quot;&gt;
      &lt;xsl:value-of select=&quot;.&quot;/&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;posted&quot;&gt;
    &lt;div class=&quot;pubdate&quot;&gt;
      &lt;xsl:value-of select=&quot;.&quot;/&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;blogroll&quot;&gt;
    &lt;div class=&quot;roll&quot;&gt;
      &lt;div align=&quot;center&quot;&gt;
        &lt;b&gt;Blog Roll&lt;/b&gt;
      &lt;/div&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;channelroll&quot;&gt;
    &lt;div class=&quot;roll&quot;&gt;
      &lt;div align=&quot;center&quot;&gt;
        &lt;b&gt;Channel Roll&lt;/b&gt;
      &lt;/div&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/div&gt;
&lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;opml&quot;&gt;
    &lt;div class=&quot;roll&quot;&gt;
      &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
        &lt;b&gt;OPML Links&lt;/b&gt;
      &lt;/div&gt;
      &lt;xsl:for-each select=&quot;link&quot;&gt;
        &lt;a&gt;
          &lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;@rss&quot;/&gt;&lt;/xsl:attribute&gt;
          &lt;b&gt;
            &lt;xsl:value-of select=&quot;blog&quot;/&gt;
          &lt;/b&gt;
        &lt;/a&gt;
        &lt;div style=&quot;margin-left:1em;&quot;&gt;
          &lt;xsl:apply-templates select=&quot;link&quot;/&gt;
        &lt;/div&gt;
      &lt;/xsl:for-each&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;ocs&quot;&gt;
    &lt;div class=&quot;roll&quot;&gt;
      &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
        &lt;b&gt;OCS Links&lt;/b&gt;
      &lt;/div&gt;
      &lt;xsl:for-each select=&quot;link&quot;&gt;
        &lt;a&gt;
          &lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;@rss&quot;/&gt;&lt;/xsl:attribute&gt;
          &lt;b&gt;
            &lt;xsl:value-of select=&quot;blog&quot;/&gt;
          &lt;/b&gt;
        &lt;/a&gt;
        &lt;div style=&quot;margin-left:1em;&quot;&gt;
          &lt;xsl:apply-templates select=&quot;link&quot;/&gt;
        &lt;/div&gt;
      &lt;/xsl:for-each&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;categories[category]&quot;&gt;
    &lt;xsl:variable name=&quot;dt&quot; select=&quot;concat(//calendar/@year, &#39;-&#39;, //calendar/@month, &#39;-&#39;, //calendar/@day)&quot;/&gt;
    &lt;div class=&quot;roll&quot;&gt;
      &lt;div align=&quot;center&quot; style=&quot;margin-bottom: 3px;&quot;&gt;
        &lt;b&gt;Post Categories&lt;/b&gt;
      &lt;/div&gt;
      &lt;div&gt;
        &lt;a&gt;
          &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?date=&lt;xsl:value-of select=&quot;$dt&quot;/&gt;&amp;amp;cat=&lt;/xsl:attribute&gt;
          &lt;b&gt;All&lt;/b&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;xsl:for-each select=&quot;category&quot;&gt;
        &lt;div&gt;
          &lt;a &gt;
            &lt;xsl:attribute name=&quot;href&quot;&gt;/blog/rss_cat.xml?:cid=&lt;xsl:value-of select=&quot;@id&quot;/&gt;&amp;amp;:bid=&lt;xsl:value-of select=&quot;/blog/title/@blogid&quot;/&gt;&lt;/xsl:attribute&gt;
	    &lt;img src=&quot;/blog/blogs/images/mxml.gif&quot; border=&quot;0&quot; alt=&quot;rss&quot;/&gt;
          &lt;/a&gt;
          &lt;a&gt;
            &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?date=&lt;xsl:value-of select=&quot;$dt&quot;/&gt;&amp;amp;cat=&lt;xsl:value-of select=&quot;@id&quot;/&gt;&lt;/xsl:attribute&gt;
            &lt;b&gt;
              &lt;xsl:value-of select=&quot;@name&quot;/&gt;
            &lt;/b&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;/xsl:for-each&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;link&quot;&gt;
    &lt;div&gt;
      &lt;xsl:if test=&quot;@rss != &#39;&#39;&quot;&gt;
        &lt;a&gt;
          &lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;@rss&quot;/&gt;&lt;/xsl:attribute&gt;
          &lt;img src=&quot;/blog/blogs/images/mxml.gif&quot; border=&quot;0&quot; alt=&quot;rss&quot;/&gt;
        &lt;/a&gt;
      &lt;/xsl:if&gt;
      &lt;a&gt;
        &lt;xsl:attribute name=&quot;href&quot;&gt;&lt;xsl:value-of select=&quot;@href&quot;/&gt;&lt;/xsl:attribute&gt;
        &lt;xsl:value-of select=&quot;.&quot; disable-output-escaping=&quot;yes&quot; /&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;calendar&quot;&gt;
    &lt;table id=&quot;calendar&quot;&gt;
      &lt;caption&gt;
        &lt;xsl:value-of select=&quot;@monthname&quot;/&gt;
        &lt;xsl:text&gt; &lt;/xsl:text&gt;
        &lt;xsl:value-of select=&quot;@year&quot;/&gt;
      &lt;/caption&gt;
      &lt;tr&gt;
        &lt;th&gt;Sun&lt;/th&gt;
        &lt;th&gt;Mon&lt;/th&gt;
        &lt;th&gt;Tue&lt;/th&gt;
        &lt;th&gt;Wed&lt;/th&gt;
        &lt;th&gt;Thu&lt;/th&gt;
        &lt;th&gt;Fri&lt;/th&gt;
        &lt;th&gt;Sat&lt;/th&gt;
      &lt;/tr&gt;
      &lt;xsl:apply-templates/&gt;
      &lt;tr&gt;
        &lt;td colspan=&quot;3&quot;&gt;
          &lt;xsl:if test=&quot;@prev != &#39;&#39;&quot;&gt;
            &lt;a&gt;
              &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?date=&lt;xsl:value-of select=&quot;@prev&quot;/&gt;&amp;amp;cat=&lt;xsl:value-of select=&quot;/blog/@category&quot;/&gt;&lt;/xsl:attribute&gt;
              &lt;xsl:value-of select=&quot;@prev-label&quot;/&gt;
            &lt;/a&gt;
          &lt;/xsl:if&gt;&amp;#160;
        &lt;/td&gt;
        &lt;td&gt;&amp;#160;&lt;/td&gt;
        &lt;td colspan=&quot;3&quot;&gt;
          &lt;xsl:if test=&quot;@next != &#39;&#39;&quot;&gt;
        &amp;#160;
        &lt;a&gt;
              &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?date=&lt;xsl:value-of select=&quot;@next&quot;/&gt;&amp;amp;cat=&lt;xsl:value-of select=&quot;/blog/@category&quot;/&gt;&lt;/xsl:attribute&gt;
              &lt;xsl:value-of select=&quot;@next-label&quot;/&gt;
            &lt;/a&gt;
          &lt;/xsl:if&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;week&quot;&gt;
    &lt;tr&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/tr&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;day&quot;&gt;
    &lt;xsl:variable name=&quot;dt&quot; select=&quot;concat(ancestor::calendar/@year, &#39;-&#39;, ancestor::calendar/@month, &#39;-&#39;)&quot;/&gt;
    &lt;td&gt;
      &lt;xsl:choose&gt;
        &lt;xsl:when test=&quot;boolean(number(@active))&quot;&gt;
          &lt;xsl:attribute name=&quot;class&quot;&gt;calactive&lt;/xsl:attribute&gt;
          &lt;a&gt;
            &lt;xsl:attribute name=&quot;href&quot;&gt;index.vsp?date=&lt;xsl:value-of select=&quot;$dt&quot;/&gt;&lt;xsl:value-of select=&quot;.&quot;/&gt;&amp;amp;cat=&lt;xsl:value-of select=&quot;/blog/@category&quot;/&gt;&lt;/xsl:attribute&gt;
            &lt;xsl:apply-templates/&gt;
          &lt;/a&gt;
        &lt;/xsl:when&gt;
        &lt;xsl:otherwise&gt;
          &lt;xsl:apply-templates/&gt;
        &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
    &lt;/td&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</pre>
      </div>
</div>
 <p>
The XML Schema for RSS v2.0 file (rss.xml)
</p>
<div>
      <pre class="programlisting">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot;&gt;
  &lt;xs:element name=&quot;channel&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;title&quot;/&gt;
        &lt;xs:element ref=&quot;link&quot;/&gt;
        &lt;xs:element ref=&quot;description&quot;/&gt;
        &lt;xs:element ref=&quot;managingEditor&quot;/&gt;
        &lt;xs:element ref=&quot;pubDate&quot;/&gt;
        &lt;xs:element ref=&quot;generator&quot;/&gt;
        &lt;xs:element ref=&quot;webMaster&quot;/&gt;
        &lt;xs:element ref=&quot;image&quot;/&gt;
        &lt;xs:element ref=&quot;cloud&quot;/&gt;
        &lt;xs:element ref=&quot;item&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;cloud&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:attribute name=&quot;domain&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;port&quot; type=&quot;xs:short&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;path&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;registerProcedure&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;protocol&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;comments&quot; type=&quot;xs:anyURI&quot;/&gt;
  &lt;xs:element name=&quot;description&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;generator&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;guid&quot; type=&quot;xs:anyURI&quot;/&gt;
  &lt;xs:element name=&quot;height&quot; type=&quot;xs:int&quot;/&gt;
  &lt;xs:element name=&quot;image&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;title&quot;/&gt;
        &lt;xs:element ref=&quot;url&quot;/&gt;
        &lt;xs:element ref=&quot;link&quot;/&gt;
        &lt;xs:element ref=&quot;description&quot;/&gt;
        &lt;xs:element ref=&quot;width&quot;/&gt;
        &lt;xs:element ref=&quot;height&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;item&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;title&quot;/&gt;
        &lt;xs:element ref=&quot;guid&quot;/&gt;
        &lt;xs:element ref=&quot;comments&quot;/&gt;
        &lt;xs:element ref=&quot;pubDate&quot;/&gt;
        &lt;xs:element ref=&quot;description&quot;/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;link&quot; type=&quot;xs:anyURI&quot;/&gt;
  &lt;xs:element name=&quot;managingEditor&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;pubDate&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;rss&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;channel&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;version&quot; type=&quot;xs:string&quot; use=&quot;required&quot; fixed=&quot;2.0&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;title&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;url&quot; type=&quot;xs:anyURI&quot;/&gt;
  &lt;xs:element name=&quot;webMaster&quot; type=&quot;xs:string&quot;/&gt;
  &lt;xs:element name=&quot;width&quot; type=&quot;xs:int&quot;/&gt;
&lt;/xs:schema&gt;
</pre>
    </div>
<br />
<br />

<a name="bloggerclientcompatibility" />
    <h3>12.7.2. Blogger Clients Compatibility</h3>

  <p>The Virtuoso Blog server implementation has been tested against the
  following blog client applications:</p>

  <ul>
      <li>
        <a href="http://radio.userland.com/download">Radio Userland</a> (Manila Blogger Bridge tool and Upstreaming), available for MS Windows and MacOS X
      </li>
      <li>
        <a href="http://www.newzcrawler.com/downloads.shtml">NewzCrawler</a>, available for MS Windows
      </li>
      <li>
        <a href="http://wbloggar.com/download/">w.bloggar</a>, available for MS Windows
      </li>
      <li>
        <a href="http://blogbuddy.sourceforge.net/">blogBuddy</a>, available for MS Windows
      </li>
      <li>
        <a href="http://www.zempt.com/download/">Zempt</a>, available for MS Windows
      </li>
      <li>
        <a href="http://www.farook.org/BlogMan.htm">BlogMan</a>, available for MS Windows
      </li>
      <li>
        <a href="http://www.myelin.co.nz/thinblog/">thinblog</a>, Java based client
      </li>
    </ul>

  <p>The steps required to allow third-party clients to operate with Virtuoso are:</p>

  <ol>
      <li>Create a WebDAV account using the Server Administration Interface
	making sure that the home 	directory is created as /DAV/&lt;username&gt;/</li>
      <li>Enable the XML-RPC bridge on a SOAP endpoint (see &quot;XML-RPC
	  endpoint configuration&quot; section above)</li>
      <li>Most client tools accept a username and password, enter the
	credentials and URI for XML-RPC endpoint.</li>
      <li>Allow the client tool time to refresh the Blog data.</li>
      <li>Post a simple message, verify its creating using the Server Administration Interface&#39;s Weblog link.</li>
    </ol>

  <div class="formalpara">
      <strong>Interoperability Notes</strong>
  <p>The &quot;Zempt&quot; application will report an error upon startup saying that
  &quot;mt.supportedTextFilters&quot; are not supported, however it it will continue to work
  with the Virtuoso&#39;s blogging server.</p>
    </div>
<br />

<a name="bloggermanagementui" />
    <h3>12.7.3. Blogs Management User Interface</h3>

  <p>The Server Administration Interface provides a way to manage existing
  blogs.  The Blog user interface is accessible from the Web Services &gt;&gt; Weblogs
  menu.  The page will show existing blogs on the server and will allow you to
  erase, edit existing, or make new blog sites.  </p>
  <p>Blog channels and categories are also configurable from this interface.</p>

<br />

<a name="blogcommunityblog" />
    <h3>12.7.4. Community Blog Site</h3>

<p>The community blog site feature pools all blog efforts into one page
providing a blog community portal.  No personal blogs are altered,
the community site provides a super-set for all blogs.</p>

<p>The community blog site is activated by enabling blogging capabilities on
the DAV administrator account &quot;dav&quot;.  This can be achieved at two places,
on the Users Administration interface or the Web Services &gt;&gt; Weblogs interface
in the Server Administration Interface menu.</p>
<br />

<a name="bloggerapi" />
    <h3>12.7.5. Blogger API</h3>

<p>The Virtuoso server supports the following methods available via XML-RPC
for Weblog management and operation:</p>

      <p>
      <a href="">blogger.newPost()</a>
    </p>
      <p>
      <a href="">blogger.editPost()</a>
    </p>
      <p>
      <a href="">blogger.deletePost()</a>
    </p>
      <p>
      <a href="">blogger.getRecentPosts()</a>
    </p>
      <p>
      <a href="">blogger.getUsersBlogs()</a>
    </p>
      <p>
      <a href="">blogger.getTemplate()</a>
    </p>
      <p>
      <a href="">blogger.setTemplate()</a>
    </p>
      <p>
      <a href="">blogger.getUserInfo()</a>
    </p>


<div class="note">
      <div class="notetitle">Note:</div>
  <p>First name is the Movable Type &quot;username&quot; up to the first
      space character, and last name is the &quot;username&quot; after the first
      space character.</p>
    </div>
<br />

<a name="bloggermetaweblog" />
    <h3>12.7.6. MetaWeblog API</h3>

      <p>
      <a href="">metaWeblog.newPost()</a>
    </p>
      <p>
      <a href="">metaWeblog.editPost()</a>
    </p>
      <p>
      <a href="">metaWeblog.getPost()</a>
    </p>
      <p>
      <a href="">metaWeblog.getRecentPosts()</a>
    </p>

<br />

<a name="bloggermovabletype" />
    <h3>12.7.7. Movable Type API</h3>

      <p>
      <a href="">mt.getRecentPostTitles()</a>
    </p>
      <p>
      <a href="">mt.getCategoryList()</a>
    </p>
      <p>
      <a href="">mt.setPostCategories()</a>
    </p>
      <p>
      <a href="">mt.getPostCategories()</a>
    </p>
      <p>
      <a href="">mt.getTrackbackPings()</a>
    </p>
      <p>
      <a href="">mt.publishPost()</a>
    </p>
      <p>
      <a href="">mt.supportedMethods()</a>
    </p>

<div class="note">
      <div class="notetitle">Note:</div>
  <p>the value of &quot;appkey&quot; is ignored by Movable Type in all of the
  Blogger XML-RPC methods.</p>
    </div>

<br />


<a name="blogatomapi" />
    <h3>12.7.8. Atom API</h3>

<p>The Atom API is a protocol for publishing and editing a blog entries using 
the common HTTP verbs:</p>

<ul>
      <li>GET - used to retrieve a blog post or perform query</li>
      <li>PUT - used to update an existing blog post</li>
      <li>POST - used to create a new post or perform an update action</li>
      <li>DELETE - used to remove a post</li>
    </ul>

<div class="formalpara">
  <strong>Authentication</strong>
  <p>The Atom API implementation accepts both HTTP basic and digest
authentication.  All requests for post content modification require an
authorization. Furthermore, the account used for authentication is checked to be 
the blog owner or have granted privileges on that particular blog.
The retrieval operations; which no post modification is possible are not
required to ask for authentication.</p>
    </div>

<div class="formalpara">
  <strong>Introspection</strong>

<p>When editing the content of a blog, the first thing is to find out the servers capabilities. 
So the &#39;introspection&#39; file lists all the functions that a given site supports.</p>
    </div>

<a name="ex_blogatomintrospection" />
    <div class="example">
      <div class="exampletitle">Intropsection</div>

<p>Request:</p>

<div>
        <pre class="programlisting">
GET /Atom/Http/intro?b=128 HTTP/1.1
Host: localhost:6666
</pre>
      </div>

<p>Response:</p>

<div>
        <pre class="programlisting">
HTTP/1.1 200 OK
Server: Virtuoso
Connection: Keep-Alive
Date: Mon, 10 Nov 2003 10:21:55 GMT
Content-Type: text/xml; charset=&quot;ISO-8859-1&quot;
Content-Length: 417

&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;introspection xmlns=&quot;http://example.com/newformat#&quot; &gt;
  &lt;create-entry&gt;http://localhost:6666/Atom/Http/entry?b=128&lt;/create-entry&gt;
  &lt;user-prefs&gt;http://localhost:6666/Atom/Http/prefs?b=128&lt;/user-prefs&gt;
  &lt;search-entries&gt;http://localhost:6666/Atom/Http/search?b=128&lt;/search-entries&gt;
  &lt;categories&gt;http://localhost:6666/Atom/Http/categories?b=128&lt;/categories&gt;
&lt;/introspection&gt;
</pre>
      </div>
</div>

<div class="formalpara">
      <strong>Posting a new entry</strong>

<p>To post a new entry, the HTTP POST must be performed with
MIME type &#39;<span class="computeroutput">application/x.atom+xml</span>&#39; 
for the request content. If server accepts the request a 
<span class="computeroutput">Location:</span> HTTP header will be 
returned to the client containing the URL to the newly created post.</p>
</div>

<a name="ex_blogatompost" />
    <div class="example">
      <div class="exampletitle">Posting an Entry</div>

<div>
        <pre class="programlisting">
POST /Atom/Http/entry?b=128 HTTP/1.1
Content-Type: application/x.atom+xml
Content-Length: nnn
Authorization: ...

&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
&lt;entry xmlns=&quot;http://example.com/newformat#&quot;&gt;
  &lt;title&gt;My Entry&lt;/title&gt;
  &lt;author&gt;
    &lt;name&gt;Blog Author&lt;/name&gt;
  &lt;/author&gt;
  &lt;issued&gt;2003-11-04T17:29:29&lt;/issued&gt;
  &lt;content type=&quot;application/xhtml+xml&quot; xml:lang=&quot;en-us&quot;&gt;
    &lt;p xmlns=&quot;&quot;&gt;Hello world!&lt;/p&gt;
  &lt;/content&gt;
&lt;/entry&gt;
</pre>
      </div>

<p>The response from server would be:</p>

<div>
        <pre class="programlisting">
HTTP/1.1 201 Created
Location: http://host:port/Atom/Http/entry?b=128&amp;id=nn
</pre>
      </div>
</div>

<div class="formalpara">
      <strong>Editing an Existing Entry</strong>

<p>An entry can be edited via the HTTP PUT method.
The URL used for PUT must be one returned by the 
<span class="computeroutput">Location:</span> header of the 
POST response or those returned from entry-search. 
The content of PUT request is same as for posting a new entry.
</p>
    </div>

<a name="ex_blogatomedit" />
    <div class="example">
      <div class="exampletitle">Editing a weblog entry</div>

<div>
        <pre class="programlisting">
POST /Atom/Http/entry?b=128&amp;id=nn HTTP/1.1
Content-Type: application/x.atom+xml
Content-Length: nnn
Authorization: ...

&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
&lt;entry xmlns=&quot;http://example.com/newformat#&quot;&gt;
  &lt;title&gt;My Entry&lt;/title&gt;
  &lt;author&gt;
    &lt;name&gt;Blog Author&lt;/name&gt;
  &lt;/author&gt;
  &lt;issued&gt;2003-11-04T17:29:29&lt;/issued&gt;
  &lt;content type=&quot;application/xhtml+xml&quot; xml:lang=&quot;en-us&quot;&gt;
    &lt;p xmlns=&quot;&quot;&gt;Hello world! (edit test)&lt;/p&gt;
  &lt;/content&gt;
&lt;/entry&gt;
</pre>
      </div>

<p>The server response is:</p>

<div>
        <pre class="programlisting">
HTTP/1.1 205 Reset Content
</pre>
      </div>
</div>

<div class="formalpara">
      <strong>Retrieving an Entry</strong>

<p>Retrieval of an existing entry is the simple, usual HTTP GET 
request with URL to the entry.</p>
    </div>

<a name="ex_blogatmgetentry" />
    <div class="example">
      <div class="exampletitle">Retrieving an Entry</div>

<div>
        <pre class="programlisting">
GET /Atom/Http/entry?b=128&amp;id=nn HTTP/1.1
Accept: application/x.atom+xml
</pre>
      </div>

<p>Server will respond with </p>

<div>
        <pre class="programlisting">
HTTP/1.1 200 OK
Content-Type: application/x.atom+xml
Content-Length: nnn

&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
&lt;entry xmlns=&quot;http://example.com/newformat#&quot;&gt;
  &lt;title&gt;My Entry&lt;/title&gt;
  &lt;author&gt;
    &lt;name&gt;Blog Author&lt;/name&gt;
  &lt;/author&gt;
  &lt;issued&gt;2003-11-04T17:29:29&lt;/issued&gt;
  &lt;content type=&quot;application/xhtml+xml&quot; xml:lang=&quot;en-us&quot;&gt;
    &lt;p xmlns=&quot;&quot;&gt;Hello world! (edit test)&lt;/p&gt;
  &lt;/content&gt;
&lt;/entry&gt;
</pre>
      </div>
</div>

<div class="formalpara">
      <strong>Deleting an Entry</strong>

<p>To remove permanently an existing entry an HTTP DELETE
method is used with URL to the entry.</p>
    </div>

<a name="ex_blogatomdelete" />
    <div class="example">
      <div class="exampletitle">Deleting an Entry</div>

<div>
        <pre class="programlisting">
DELETE /Atom/Http/entry?b=128&amp;id=nn HTTP/1.1
</pre>
      </div>

<p>Response:</p>

<div>
        <pre class="programlisting">
HTTP/1.1 200 OK
</pre>
      </div>
</div>

<div class="formalpara">
      <strong>Searching Entries</strong>

<p>To retrieve a subset of messages based some criteria a search 
should be performed.  The current implementation supports two variants: 
range and last_N.</p>
    </div>

<a name="ex_blogatomsearch" />
    <div class="example">
      <div class="exampletitle">Searching</div>

<div>
        <pre class="programlisting">
GET /Atom/Http/search?b=128?last=7 HTTP/1.1
Accept: application/x.atom+xml
Host: localhost:6666
Authorization: ...
</pre>
      </div>

<p>or </p>

<div>
        <pre class="programlisting">
GET /Atom/Http/search?b=128&amp;start-range=2&amp;end-range=27 HTTP/1.1
Accept: application/x.atom+xml
Host: localhost:6666
Authorization: ...
</pre>
      </div>

<p>Response from server will look like:</p>

<div>
        <pre class="programlisting">
&lt;search-results xmlns=&quot;http://example.com/newformat#&quot;&gt;
&lt;match title=&quot;Classic ASP Framework. Make your Classic...&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=6&lt;/match&gt;
&lt;match title=&quot;DB Navigator - an open source .NET control&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=4&lt;/match&gt;
&lt;match title=&quot;Sort an Array with Non-Comparable Items&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=5&lt;/match&gt;
&lt;match title=&quot;SignedXML Licensing Sample&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=7&lt;/match&gt;
&lt;match title=&quot;TicTacToe&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=1&lt;/match&gt;
&lt;match title=&quot;Check your eMails in Hotmail using HTTPMail&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=2&lt;/match&gt;
&lt;match title=&quot;Slashdot.org RSS Feed Reader&quot;&gt;http://localhost:6666/Atom/Http?b=128&amp;amp;id=3&lt;/match&gt;
&lt;/search-results&gt;
</pre>
      </div>

<p>Each sub element of the search result contains the title of the post and its 
URL.  These URLs can be used retrieved using the GET method, or modified via PUT/DELETE
methods.</p>
</div>

<a name="blogatomclientapi" />
    <h4>12.7.8.1. Atom Client API</h4>

<p>The Atom Client API is a mirror of the blogger API functionality, 
but uses the Atom protocol instead of XML-RPC.  Before the Atom API can 
be put to use, the introspection file must be retrieved in order to know 
the URLs for the requests.</p>

<ul>
<li>
<p>
          <span class="computeroutput">atom.new_Post 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>, 
  <span class="paramdef">in <span class="parameter">req</span> &quot;blogRequest&quot;</span>);</span>
        </p>

<p>This is to post a new entry to the blog identified by &#39;uri&#39;.
The &#39;req&#39; must be initialized with authentication and entry data. 
This function returns the URL to the new entry. This could be used with sequential
GET/PUT or DELETE requests for it. </p>
</li>

<li>
<p>
          <span class="computeroutput">atom.edit_Post 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>, 
  <span class="paramdef">in <span class="parameter">req</span> &quot;blogRequest&quot;</span>);</span>
        </p>

<p>This is to modify an existing entry identified by &#39;uri&#39;.
The &#39;req&#39; must be initialized with authentication and entry data.
The function returns true on success or will signal an error.</p>
</li>

<li>
<p>
          <span class="computeroutput">atom.delete_Post 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>, 
  <span class="paramdef">in <span class="parameter">req</span> &quot;blogRequest&quot;</span>);</span>
        </p>

<p>This is to delete an existing entry identified by &#39;uri&#39;.
The &#39;req&#39; must be initialized with authentication data.
The function returns true on success or will signal an error.</p>
</li>

<li>
<p>
          <span class="computeroutput">atom.get_Post 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>, 
  <span class="paramdef">in <span class="parameter">req</span> &quot;blogRequest&quot;</span>);</span>
        </p>

<p>This is to retrieve an existing post entry identified by &#39;uri&#39;.
The &#39;req&#39; must be initialized with authentication data.
This function will return on success an MTWeblogPost UDT, filled with 
post entry data.</p>
</li>

<li>
<p>
          <span class="computeroutput">atom.get_RecentPosts 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>, 
  <span class="paramdef">in <span class="parameter">req</span> &quot;blogRequest&quot;</span>, 
  <span class="paramdef">in <span class="parameter">num</span> int</span>);</span>
        </p>

<p>This is to retrieve last-N post entries identified by blog search URL - &#39;uri&#39;.
The &#39;req&#39; must be initialized with authentication data.
&#39;num&#39; is number of entries to return.</p>

<p>This function returns an array of arrays containing the title and URL of the 
matching blog posts.</p>
</li>

<li>
<p>
          <span class="computeroutput">atom.get_Intro 
  (<span class="paramdef">in <span class="parameter">uri</span> varchar</span>);</span>
        </p>

<p>This is used to return Introspection information for a blog identified by 
introspection file - &#39;uri&#39;.</p>
</li>
</ul>


<a name="ex_blogatomclientapi" />
    <div class="example">
      <div class="exampletitle">Using the Atom Client API</div>

<p>Getting the introspection info about a blog</p>

<div>
        <pre class="programlisting">
declare x any;
x := atom.get_Intro (&#39;http://localhost:6666/Atom/Http/intro?b=128&#39;);
-- x will contain
-- ((&quot;create-entry&quot; &quot;http://localhost:6666/Atom/Http/entry?b=128&quot; ) 
--  (&quot;user-prefs&quot;
-- &quot;http://localhost:6666/Atom/Http/prefs?b=128&quot; ) (&quot;search-entries&quot;
-- &quot;http://localhost:6666/Atom/Http/search?b=128&quot; ) (&quot;categories&quot;
-- &quot;http://localhost:6666/Atom/Http/categories?b=128&quot; ) )
</pre>
      </div>

<p>make a new entry</p>

<div>
        <pre class="programlisting">
declare resp any;
declare req &quot;blogRequest&quot;;
declare stru &quot;MTWeblogPost&quot;;

req := new &quot;blogRequest&quot; (&#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;dav&#39;, &#39;dav&#39;);
stru := new &quot;MTWeblogPost&quot; ();
stru.title := &#39;My title&#39;
stru.description := &#39;&lt;p&gt;hello&lt;/p&gt;&#39;;
req.struct := stru;
resp := atom.new_Post (&#39;http://localhost:6666/Atom/Http/entry?b=128&#39;, req);
</pre>
      </div>

<p>The response, resp, would contain: 
  <span class="computeroutput">http://localhost:6666/Atom/Http/entry?b=128&amp;id=1</span>
      </p>

<p>edit an entry:</p>

<div>
        <pre class="programlisting">
declare resp any;
declare req &quot;blogRequest&quot;;
declare stru &quot;MTWeblogPost&quot;;

req := new &quot;blogRequest&quot; (&#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;dav&#39;, &#39;dav&#39;);
stru := new &quot;MTWeblogPost&quot; ();
stru.title := &#39;test&#39;
stru.description := &#39;&lt;p&gt;hello from me&lt;/p&gt;&#39;;
req.struct := stru;
atom.edit_Post (&#39;http://localhost:6666/Atom/Http/entry?b=128&amp;id=1&#39;, req);
</pre>
      </div>

<p>delete it:</p>

<div>
        <pre class="programlisting">
atom.delete_Post (&#39;http://localhost:6666/Atom/Http/entry?b=128&amp;id=1&#39;, req);
</pre>
      </div>
</div>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>
        <a href="bitworking.org">http://bitworking.org/rfc/draft-gregorio-07.html</a>
      </p>
    </div>

  <br />
<br />



<a name="bloggerendpointconf" />
    <h3>12.7.9. XML-RPC Endpoint Configuration</h3>

  <p>The Virtuoso blog server can be contacted directly by SOAP XML-RPC.
      A virtual directory can be created with blogger APIs (Blogger, MetaWeblog, MoveableType, Atom) ability,
      which requires
  a mapping to the SOAP endpoint and grants to use the blogger API.
  This can be done in two ways:</p>

  <ol>
      <li>
     <div class="formalpara">
          <strong>Using the graphical Server Administration Interface</strong>
	<p>You can use your web browser to configure a virtual directory based on the &quot;XML-RPC link&quot;
	template and with bloggerAPI enabled:</p>
     </div>

	<ol>
          <li>Open a web browser on the Administration User Interface and navigate to: Internet Domains; HTTP Virtual Directories; Edit URL mappings.</li>
          <li>Create a new virtual directory.</li>
          <li>Select the template for &quot;XML-RPC link&quot;.</li>
          <li>Check the option &#39;bloggerAPI&#39; is enabled, this will expose all available blogger APIs to the endpoint (Blogger, MetaWeblog, MoveableType, Atom).</li>
          <li>Configure the logical path.</li>
          <li>Click Add to save the definition.</li>
        </ol>

  <div class="tip">
          <div class="tiptitle">See Also:</div>
  <p>
            <a href="htmlconductorbar.html#httpvirtualdirs">Virtual Directory Administration UI</a>
          </p>
  <p>
            <a href="fn_vhost_define.html">vhost_define()</a>, <a href="fn_vhost_remove.html">vhost_remove()</a>
          </p>
  </div>

	<p>The new logical path now will support XML-RPC and will support blogger API requests.</p>
  </li>
      <li>
     <div class="formalpara">
          <strong>Programmatical: Script &amp; ISQL</strong>
  <p>This method gives you full control, you must perform all steps to
  allow full support for the blogger API on a virtual directory.  Below is a
  template list of commands that could be in a script.</p>
     </div>

  <p>Using a script, <span class="computeroutput">blogserver.sql</span>, with following contents:</p>

<div>
          <pre class="programlisting">
vhost_define (
  lpath=&gt;&#39;/RPC2&#39;,
  ppath=&gt;&#39;/SOAP/&#39;,
  soap_user=&gt;&#39;$U{usr}&#39;,
  soap_opts=&gt;vector (&#39;XML-RPC&#39;, &#39;yes&#39;)
  );

grant execute on &quot;blogger.newPost&quot; to $U{usr};
grant execute on &quot;blogger.editPost&quot; to $U{usr};
grant execute on &quot;blogger.deletePost&quot; to $U{usr};
grant execute on &quot;blogger.getPost&quot; to $U{usr};
grant execute on &quot;blogger.getRecentPosts&quot; to $U{usr};
grant execute on &quot;blogger.getUsersBlogs&quot; to $U{usr};
grant execute on &quot;blogger.getTemplate&quot; to $U{usr};
grant execute on &quot;blogger.setTemplate&quot; to $U{usr};
grant execute on &quot;blogger.getUserInfo&quot; to $U{usr};
grant execute on &quot;metaWeblog.newPost&quot; to $U{usr};
grant execute on &quot;metaWeblog.editPost&quot; to $U{usr};
grant execute on &quot;metaWeblog.getPost&quot; to $U{usr};
grant execute on &quot;metaWeblog.getRecentPosts&quot; to $U{usr};
grant execute on &quot;mt.getRecentPostTitles&quot; to $U{usr};
grant execute on &quot;mt.getCategoryList&quot; to $U{usr};
grant execute on &quot;mt.setPostCategories&quot; to $U{usr};
grant execute on &quot;mt.getPostCategories&quot; to $U{usr};
grant execute on &quot;mt.getTrackbackPings&quot; to $U{usr};
grant execute on &quot;mt.publishPost&quot; to $U{usr};
grant execute on &quot;mt.supportedMethods&quot; to $U{usr};
</pre>
        </div>

  <p>One can start ISQL using the following parameters:</p>

<div>
          <pre class="programlisting">
$ isql 1111 dba dba -u usr=&quot;&lt;SQL user for execution&gt;&quot; blog_server.sql
</pre>
        </div>

  <p>Where &quot;&lt;SQL user for execution&gt;&quot; is an existing SQL user account other than dba.</p>

  <div class="note">
          <div class="notetitle">Note:</div>
    <p>If you specify the &quot;dba&quot; as user for SOAP execution in a virtual directory,
  the grant statements will not be needed and this will open a security hole.  So this
  approach is not recommended.  It is always better to have a separate user for
  SOAP execution with limited rights.</p>
        </div>

  </li>
    </ol>
<br />

<a name="bloggerhooks" />
    <h3>12.7.10. Blog Hooks - Customizing the Blog Server</h3>

<p>Virtuoso provides the default system for blogging using one of the
supported .  Virtuoso
provides several PL hooks to customize the blog server.
The following hooks are available for definition:</p>

<ul>
      <li>authenticate_&lt;appkey&gt; (in req blogRequest)</li>
      <li>newPost_&lt;appkey&gt; (in req blogRequest)</li>
      <li>editPost_&lt;appkey&gt; (in req blogRequest)</li>
      <li>deletePost_&lt;appkey&gt; (in req blogRequest)</li>
      <li>getPost_&lt;appkey&gt; (in req blogRequest)</li>
      <li>getRecentPosts_&lt;appkey&gt; (in req blogRequest, in numberOfPosts int)</li>
    </ul>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>
        <a href="xmlrpc.html">XML-RPC section</a>
      </p>
    </div>

<p>blogRequest is a UDT defined as follows:</p>

<div>
      <pre class="programlisting">
create type &quot;blogPost&quot; as (
 			  &quot;content&quot; varchar,		-- message
			  &quot;dateCreated&quot; datetime,	-- timestamp
			  &quot;postid&quot; varchar,		-- message ID
			  &quot;userid&quot; int			-- creator
			) temporary self as ref
;

create type &quot;blogRequest&quot; under &quot;blogPost&quot;
			as
			(
			  user_name varchar,		-- user name
			  passwd varchar,		-- credentials
		          appkey varchar,		-- application key
			  blogid varchar,		-- web log ID
		          postId varchar,		-- message ID
			  auth_userid integer,		-- user ID
                          publish smallint,		-- not used, but still in API
			  struct DB.DBA.MWeblogPost 	-- used in WebMetaLog
			) temporary self as ref

constructor method blogRequest (
			  appkey varchar,
			  blogid varchar,
			  postId varchar,
			  user_name varchar,
			  passwd varchar
			  )
;
</pre>
    </div>


<a name="ex_customblog" />
    <div class="example">
      <div class="exampletitle">Customizing the BLOG Server</div>

<div>
        <pre class="programlisting">
-- SIMPLE BLOG APPLICATION
-- application key: 0123456789
--
-- the following UDTs are used in API calls
--
-- single message
-- create type &quot;blogPost&quot; as (
-- 			  &quot;content&quot; varchar,
--			  &quot;dateCreated&quot; datetime,
--			  &quot;postid&quot; varchar,
--			  &quot;userid&quot; int
--			) temporary self as ref
--
--
-- a blog request
-- create type &quot;blogRequest&quot; under &quot;blogPost&quot;
--			as
--			(
--			  user_name varchar,
--			  passwd varchar,
--		          appkey varchar,
--			  blogid varchar,
--		          postId varchar,
--			  auth_userid integer,
--                        publish smallint
--			) temporary self as ref
--
-- as metaWeblog API not not have appkey, we are assuming &#39;META_WEBLOG&#39; for it.

drop table BLOG;

create table BLOG (
			B_APPKEY varchar,
			BLOG_ID varchar,
			B_CONTENT long varchar,
			B_POST_ID varchar,
			B_TS timestamp,
			B_USER_ID integer,
			primary key (B_APPKEY, BLOG_ID, B_POST_ID)
);


-- APPLICATION LEVEL HOOKS
create procedure authenticate_app (inout req blogRequest)
{
    declare pwd varchar;
    declare id int;
    dbg_obj_print (&#39;auth&#39;);
    whenever not found goto nf;
    select U_PWD, U_ID into pwd, id from WS.WS.SYS_DAV_USER where U_NAME = req.user_name;
    if (isstring (pwd))
      {
        if ((pwd[0] = 0 and pwd_magic_calc (req.user_name, req.passwd) = pwd)
                            or (pwd[0] &lt;&gt; 0 and pwd = req.passwd))
          {
            req.auth_userid := id;
            return;
          }
      }
  nf:
    signal (&#39;42000&#39;, &#39;Access denied&#39;);
}
;

create procedure
authenticate_0123456789 (in req blogRequest)
{
  authenticate_app (req);
}
;

create procedure
newPost_0123456789 (in req blogRequest)
{
   req.postId := cast (sequence_next (&#39;blogger.postid&#39;) as varchar);
   insert into BLOG (B_APPKEY, BLOG_ID, B_CONTENT, B_POST_ID, B_USER_ID)
       values (req.appkey, req.blogid, req.content, req.postId, req.auth_userid);
}
;

create procedure
editPost_0123456789 (in req blogRequest)
{
   update BLOG set B_CONTENT = req.content where B_APPKEY = req.appkey and B_POST_ID = req.postId;
}
;


create procedure
deletePost_0123456789  (in req blogRequest)
{
  delete from BLOG where B_APPKEY = req.appkey and B_POST_ID = req.postId;
}
;


create procedure
getPost_0123456789  (in req blogRequest)
{
      declare content, datecreated, userid any;
      declare post blogPost;

      whenever not found goto nf;
      select sprintf (&#39;%V&#39;, blob_to_string (B_CONTENT)), B_TS, B_USER_ID into content, datecreated, userid
	    from BLOG where B_APPKEY = req.appkey and B_POST_ID = req.postId;

      post := new blogPost ();
      post.&quot;content&quot; := content;
      post.&quot;dateCreated&quot; := datecreated;
      post.&quot;postid&quot; := req.postId;
      post.&quot;userid&quot; := userid;
      dbg_obj_print (&#39;getPost&#39;, post);
      return post;
    nf:
      signal (&#39;22023&#39;, &#39;Cannot find a post with Id = &#39; || req.postId);
}
;


create procedure
getRecentPosts_0123456789  (in req blogRequest, in numberOfPosts int)
{
  declare ret, elm any;
  declare post blogPost;

  ret := vector ();
  for select sprintf (&#39;%V&#39;, blob_to_string (B_CONTENT)) as B_CONTENT, B_TS, B_USER_ID, B_POST_ID
	from BLOG where B_APPKEY = req.appkey and BLOG_ID = req.blogId order by B_TS desc do
   {
     post := new blogPost ();
     post.&quot;content&quot; := B_CONTENT;
     post.&quot;dateCreated&quot; := B_TS;
     post.&quot;postid&quot; := B_POST_ID;
     post.&quot;userid&quot; := B_USER_ID;
     ret := vector_concat (ret, vector (post));
     numberOfPosts := numberOfPosts - 1;
     if (numberOfPosts &lt;= 0)
       goto endg;
   }
endg:
  return ret;
}
;
</pre>
      </div>
</div>
<br />

<a name="bloggerclientapi" />
    <h3>12.7.11. Blogger Client API</h3>

<p>
    <span class="funcdef">varchar <span class="function">blogger.new_Post
  (<span class="paramdef">in <span class="parameter">uri</span>,  varchar,
   in <span class="parameter">req</span>,  &quot;blogRequest&quot;,
   in <span class="parameter">content</span> varchar</span>);</span>
    </span>
    </p>

<p>
    <span class="funcdef">boolean <span class="function">blogger.delete_Post
  (in <span class="parameter">uri</span>,  varchar,
   in <span class="parameter">req</span> &quot;blogRequest&quot;)</span>
    </span>
    </p>

<p>
    <span class="funcdef">boolean <span class="function">blogger.edit_Post
  (in <span class="parameter">uri</span>,  varchar,
   in <span class="parameter">req</span>,  &quot;blogRequest&quot;,
   in <span class="parameter">content</span> varchar)</span>
    </span>
    </p>

<p>
    <span class="funcdef">blogPost <span class="function">blogger.get_Post
  (in <span class="parameter">uri</span>,  varchar,
   in <span class="parameter">req</span> &quot;blogRequest&quot;)</span>
    </span>
    </p>

<p>
    <span class="funcdef">vector <span class="function">blogger.get_Recent_Posts
  (in <span class="parameter">uri</span>,  varchar,
   in <span class="parameter">req</span>,  &quot;blogRequest&quot;,
   in <span class="parameter">lim</span> int)</span>
    </span>
    </p>


<a name="ex_bloggerclient" />
    <div class="example">
      <div class="exampletitle">The Blogging Client</div>

<p>Create a new message.</p>
<div>
        <pre class="programlisting">
SQL&gt; select blogger.new_Post (&#39;http://localhost:6666/RPC2&#39;,
    blogRequest (&#39;0123456789&#39;, &#39;home&#39;, &#39;&#39;, &#39;dav&#39;, &#39;dav&#39;),&#39;test&#39;);
callret
VARCHAR
_______________________________________________________________________________

6

1 Rows. -- 267 msec.
</pre>
      </div>

<p>Edit a message created with previous step:</p>
<div>
        <pre class="programlisting">
SQL&gt; select blogger.edit_Post (&#39;http://localhost:6666/RPC2&#39;,
    blogRequest (&#39;0123456789&#39;, &#39;home&#39;, &#39;6&#39;, &#39;dav&#39;, &#39;dav&#39;), &#39;test edited&#39;);
callret
VARCHAR
_______________________________________________________________________________

1

1 Rows. -- 194 msec.
</pre>
      </div>

<p>Get the message, result will be in a blogPost UDT:</p>
<div>
        <pre class="programlisting">
SQL&gt;  dbg_obj_print (blogger.get_Post (&#39;http://localhost:6666/RPC2&#39;,
      blogRequest (&#39;0123456789&#39;, &#39;home&#39;, &#39;6&#39;, &#39;dav&#39;, &#39;dav&#39;)));

Done. -- 120 msec.
</pre>
      </div>

<div>
        <pre class="programlisting">
---- server console ----
{
        REF:[ref:0xa0deb00 obj:0xa1ed168 DB.DBA.blogPost]
        content=N&quot;test edited&quot;
        dateCreated={ts 2003-04-08 15:34:13.000000}
        postid=N&quot;6&quot;
        userid=2
}
------------------------
</pre>
      </div>

<p>get list of messages, in our case the result will be a vector with one
element of blogPost UDT.</p>

<div>
        <pre class="programlisting">
SQL&gt; dbg_obj_print (blogger.get_Recent_Posts (&#39;http://localhost:6666/RPC2&#39;, blogRequest (&#39;0123456789&#39;, &#39;home&#39;, &#39;&#39;, &#39;dav&#39;, &#39;dav&#39;), 10));

Done. -- 124 msec.

---- server console ----
({
        REF:[ref:0xa2426a8 obj:0xa20af40 DB.DBA.blogPost]
        content=N&quot;test edited&quot;
        dateCreated={ts 2003-04-08 15:34:13.000000}
        postid=N&quot;6&quot;
        userid=2
}
 )
------------------------

&lt;programlisting&gt;&lt;![CDATA[
SQL&gt; select blogger.delete_Post (&#39;http://localhost:6666/RPC2&#39;,
    blogRequest (&#39;0123456789&#39;, &#39;home&#39;, &#39;6&#39;, &#39;dav&#39;, &#39;dav&#39;));
callret
VARCHAR
_______________________________________________________________________________

1

1 Rows. -- 337 msec.
</pre>
      </div>
</div>

<p>There are more examples on using the API in the tutorials.</p>
<br />


<a name="xmlstoragesystem" />
    <h3>12.7.12. xmlStorageSystem API</h3>

<p>xmlStorageSystem is an Web storage system for documents that are
programmable over XML-RPC and SOAP 1.1.  Uploaded files are accessible via
HTTP.  xmlStorageSystem has methods that allow users to register with the
service; upload a set of files; query the server to find out its capabilities;
and to register a notification request.</p>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>
        <a href="xmlrpc.html">XML-RPC section</a>
      </p>
    </div>



 <p>The API methods are:</p>
 <ul>
    <li>
        <a href="fn_xmlStorageSystem.registerUser.html">xmlStorageSystem.registerUser()</a>
    </li>
    <li>
        <a href="fn_xmlStorageSystem.mailPasswordToUser.html">xmlStorageSystem.mailPasswordToUser()</a>
    </li>
    <li>
        <a href="fn_xmlStorageSystem.getServerCapabilities.html">xmlStorageSystem.getServerCapabilities()</a>
    </li>
    <li>
        <a href="fn_xmlStorageSystem.deleteMultipleFiles.html">xmlStorageSystem.deleteMultipleFiles()</a>
    </li>
    <li>
        <a href="fn_xmlStorageSystem.saveMultipleFiles.html">xmlStorageSystem.saveMultipleFiles()</a>
    </li>
    <li>
        <a href="">xmlStorageSystem.requestNotification()</a>
    </li>
    </ul>

&gt;<a name="xssreltodav" />
    <h4>12.7.12.1. Relation to the WebDAV Repository</h4>

 <p>The xmlStorageSystem stores uploaded files in the WebDAV repository.
 Upon user registration a &quot;blog&quot; sub-folder will be created in the user-account
 home directory, into which these files will be uploaded and stored using the
 xmlStorageSystem API.</p>

<div class="formalpara">
      <strong>Authentication</strong>
  <p>The XML Storage System uses WebDAV enabled accounts to authenticate.
  The passwords sent via the xmlStorageSystem API (except registerUser,
  see below) must be an MD5 hash of the real user password.  In this way
  clear text password cannot be captured from network sniffers.</p>
    </div>

<div class="formalpara">
      <strong>Cloud notification services</strong>
<p>
The aggregators scan for changes in an interval, but in some situations we want to know when a channel has changed immediately. Notification makes it possible to always be in sync with bandwidth conservation and unneeded loops.
This is possible to register an aggregator using a xmlStorageSystem.requestNotification function, also to make aggregator to know about such service it&#39;s parameters are exposed in &lt;cloud&gt; sub-element of &lt;channel&gt; of the RSS files. The notification works as follows: aggregator gets registered via xmlStorageSystem.requestNotification; Then if a registered link changes, the aggregator will be notified via specified protocol and method. The aggregator needs to register itself every 24 hour, otherwise the registration will expire. For full explanation of the cloud element of RSS file see reference at &quot;http://backend.userland.com/rss#ltcloudgtSubelementOfLtchannelgt&quot;.
</p>
</div>

<br />

<a name="xssenabledvirtdir" />
    <h4>12.7.12.2. Enabling XML Storage System in a Virtual Directory</h4>

  <p>The XML Storage System can be enabled by creating a virtual directory
  as a SOAP enabled directory, where the SOAP users is set to DBA or any
  other user granted execute permissions to the xmlStorageSystem methods.</p>

  <a name="ex_xssvirtdir" />
    <div class="example">
      <div class="exampletitle">Enabling an xmlStorageSystem Virtual Directory</div>

  <p>via ISQL tool:</p>

<div>
        <pre class="programlisting">
  SQL&gt; vhost_define (lpath=&gt;&#39;/xmlStorageSystem&#39;, ppath=&gt;&#39;/SOAP/&#39;,
      soap_user=&gt;&#39;dba&#39;);
</pre>
      </div>
</div>
  <p>The xmlStorageSystem takes into account the following user options:</p>

  <ul>
      <li>maxFileSize, integer - maximum file length allowed for upload</li>
      <li>maxBytesPerUser, integer - maximum total bytes</li>
    </ul>

  <p>These are set upon initial registration to 1Mb/40Mb respectively
  and can be changed via the Visual Server Administration Interface -&gt; WebDAV -&gt;
  WebDAV users -&gt; Options link.</p>
  <br />
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.13. User&#39;s Blog quota</h3>
<p>
In reality blog users are going to consume data space via weblog posts.
For maximum flexibility to blog host administrators the following quotas are
available:
</p>
<p>
&quot;Post Quotas&quot;: A maximum number of posts
&quot;Cumulative Post Size&quot;: A threshold that is based on a cumulative size of
posts.
These are settable to a user which may do a blog posts via WebDAV - User accounts UI.
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.14. Posting a message in to the Blog</h3>
<p>
To post a message to the blog usually is used various tools implementing a blogger APIs as clients.
These are standalone tools running on a PC or other platform, but not in all cases one have
these tolls on hand. Therefore a web interface is needed. The default home page (index.vspx) implements authentication schema and allows blog owners to post to their blogs. To login to that page blogger should go to the site home page and when supply valid credentials will be authenticated and thus possible to make posts/edit existing etc.
For authenticated user in that case is also  possible to change details, settings channel subscriptions.
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.15. Multi-author blogging</h3>
<p>
In many cases many people needs authoring in common blog. For that case
web admin have to create a blog which is owned by &quot;group&quot; (not by web user) and then granting this role to
users which are authors will give them access to post on that blog. As group cannot be authenticated, thus it&#39;s not possible to login as group and post on behalf of it; the post&#39;s author have to be a valid web user account. This feature does not contradict with possibility authors to have their own blogs, they can have own and post to many &quot;group&quot; blogs.
Granting access to a &quot;group&quot; blog can be done via WebDAV users UI, or with GRANT statement via ISQL tool.
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.16. Posting a comments</h3>
<p>
The blog is a something that one person or group of persons (authors) exposing to the public. So in some cases this material may need commentary from other people than authors. This is a option to the blog settings, when it&#39;s enabled (default) the home page of the blog (via permaLink) will offer a post form to make a comment.
When making a comment the author&#39;s details can be recorded and re-used based on cookie; comment poster may control that option. Once comment is posted it can be read in same place (permaLink) as in discussion group.
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.17. Blog Post Upstreaming (bridging)</h3>
<p>The blog upstreaming allows bloggers to keep in sync their blogs on different servers.
It is possible for blogger to define a routing target, where his/her posts will be sent
after local post is made, updated or deleted. This feature using blogger APIs (Blogger, MetaWeblog, MovableType)
to pass messages to the remote. Therefore the target server must support one of these APIs.
</p>
<p>The upstreaming works in following manner:</p>
<p>The blogger defines a routing job, which is of type &quot;Upstream&quot;.
To do this can be used Weblog Bridge UI following the steps: enter the XML-RPC endpoint, username and password valid there; hit &quot;Fetch&quot; to retrieve blogs on that host where the account can post; select desired account ; specify a time interval for update and which categories of posts to exclude; press &quot;add&quot; button.
</p>
<p>This is is a equivalent of executing a simple insert statement : </p>
<div>
      <pre class="programlisting">

SQL&gt; INSERT INTO DB.DBA.SYS_ROUTING
	(
	R_JOB_ID,
	R_TYPE_ID,
	R_PROTOCOL_ID,
	R_DESTINATION,
	R_DESTINATION_ID,
	R_AUTH_USER,
	R_AUTH_PWD,
	R_ITEM_ID,
	R_FREQUENCY,
	R_EXCEPTION_ID)
	VALUES
	(
	1,	-- unique for job
	1,	-- Upstreaming job
	1,	-- Blogger API (2 for metaWeblog, 3 from mt)
	&#39;http://localhost:80/RPC2&#39;, -- target endpoint
	&#39;home&#39;,	-- target BlogID
	&#39;visitor&#39;, -- user
	&#39;secret&#39;,  -- secret
	&#39;128&#39;,	   -- local Blog ID (which to replicate)
	60,	   -- hourly update
	&#39;0;1;&#39;	   -- exclude posts within categories with ID 0 and 1
	);

</pre>
    </div>
<p>This will make so when post is added/edited/deleted to make entry(es) in SYS_BLOGS_ROUTING_LOG table.
Then on specified R_FREQUENCY a scheduled job will make blogger XML-RPC requests to the target server using API as specified in R_PROTOCOL_ID field.
If target server is down the entries will be kept for next job round.
</p>
<p>The upstreaming feature can be extended easily to make another form of routing. The e-mail notification services in blogging is just one of them.</p>
<p>The following shows how this feature can be triggered with simple insert command:</p>
<div>
      <pre class="programlisting">

INSERT INTO DB.DBA.SYS_ROUTING
	(R_JOB_ID,R_TYPE_ID,R_PROTOCOL_ID,R_DESTINATION,R_ITEM_ID,R_FREQUENCY,R_EXCEPTION_ID)
	VALUES(
	2,  -- unique for job
	2,  -- Email notification
	4,  -- STMP protocol
	&#39;mail.domain.com:25&#39;, -- mail server
	&#39;128&#39;, -- local Blog ID
	10,     -- scan every 10 minutes
	&#39;0;1;&#39;  -- exclude posts within categories with ID 0 and 1
	);

</pre>
    </div>
<p>The same can be done via Weblog UI - Notification setup</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.18. Weblogs API</h3>
<p>This API consists of &quot;weblogUpdates.ping&quot; XML-RPC call and server-side implementation.</p>
<p>The blog owner may enable weblogs pings as option in the blog settings. Then when it&#39;s blog gets updated a ping request will be sent on periodic basis to the &quot;http://rpc.weblogs.com/weblogUpdates&quot; server.</p>
<p>The server also implements weblogUpdates.ping method. If this method is exposed on a XML-RPC enabled endpoint, other parties may use it for notification.
</p>
<p>
The server implementation consist of :
weblogUpdates.ping (in weblogname varchar, in weblogurl varchar, out Result struct). The party sends a ping with blog name and url and receive a common for blogger API response as struct (flError boolean, message varchar).
Also a public accessible http://host:port/blog/weblogs.xml file is available for aggregators to track the latest additions made via Weblogs ping call. Please note that this file generates during on weblog site setup. hence we will have this file only if community  blog pages are generated.
</p>
<p>
The weblogs.xml file follows the XMLSchema below:</p>
<div>
      <pre class="programlisting">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot;&gt;
  &lt;xs:element name=&quot;weblog&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:attribute name=&quot;name&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;url&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;when&quot; type=&quot;xs:int&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name=&quot;weblogUpdates&quot;&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref=&quot;weblog&quot; maxOccurs=&quot;unbounded&quot;/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;version&quot; type=&quot;xs:string&quot; use=&quot;required&quot; fixed=&quot;1&quot;/&gt;
      &lt;xs:attribute name=&quot;updated&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
      &lt;xs:attribute name=&quot;count&quot; type=&quot;xs:int&quot; use=&quot;required&quot;/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;

</pre>
    </div>

  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.19. Subscriptions</h3>
<p>
Every blogger read and link to it&#39;s blog a many other sources, which are usually RSS feeds or other Web content.
As RSS feeds (doesn&#39;t matter in which format RSS/RDF) are common practice to offer XML data from blogs, this is
preferable source for most of the bloggers. The utilities for collecting such data are known as aggregators.
</p>
<p>
The blogging support implements a own channel/blog aggregator, so bloggers may import RSS as specifying a
URL to it, or using a directory formats as OCS and OPML. Secondly the channel feeds requested by blogger will be refreshed on a periodic basis (depending of channel parameters) and will feed the data locally. Once the channel is
refreshed a blogger may do &quot;BlogThis!&quot; when browsing the local copy of the channel. This function is available via Admin UI - Weblog UI, or via &quot;Channels&quot; on blog home page when owner is authenticated.
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.20. Trackback API</h3>
<p>
The TrackBack provides a method of notification between websites: it is a method of person A saying to person B, &quot;This is something you may be interested in.&quot; To do that, person A sends a TrackBack ping to person B.
TrackBack ping call: this is a small message sent from one webserver to another via HTTP POST or GET.
There are few situations where track back is useful:
*As a form of remote comments rather than posting the comment directly on person B&#39;s weblog, person A posts it on his own weblog, then sends a TrackBack ping to notify person B.
*Person A has written a post that group of people are interested in; then it sends a trackback to a community server and there visitors can show it.
</p>
<p>
The implementation consist of :
* the &quot;trackback&quot; method which can be invoked via REST(HTTP POST)
* auto-discovery of the trackback URL in default blog home page
</p>
<p>
trackback (varchar id, varchar url, varchar title, varchar excerpt, varchar blog_name, varchar __mode)
the method can be invoked via REST and returns a XML response.
</p>
<p>
A typical trackback post request look-like as :
</p>
<div>
      <pre class="programlisting">

POST /mt-tb/Http/trackback?id=1
Content-Type: application/x-www-form-urlencoded
title=Some+Title&amp;url=http://www.some.domain/&amp;excerpt=An+excerpt&amp;blog_name=foo

</pre>
    </div>
<p>
A successful trackback response :
</p>
<div>
      <pre class="programlisting">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;response&gt;
  &lt;error&gt;0&lt;/error&gt;
&lt;/response&gt;

</pre>
    </div>
<p>
When &quot;__mode&quot;  parameter is specified via GET request, then trackback method returns
a RSS v0.91 XML data for given post enclosed in response element.
</p>
<p>
A sample request and response follows:
</p>
<div>
      <pre class="programlisting">

http://host:port/mt-tb/Http/trackback?id=3&amp;__mode=rss

&lt;response&gt;
&lt;error&gt;0&lt;/error&gt;
&lt;rss version=&quot;0.91&quot;&gt;
&lt;channel&gt;
  &lt;title/&gt;
  &lt;link&gt; http://....  &lt;/link&gt;
  &lt;description&gt; Description text ....  &lt;/description&gt;
&lt;/channel&gt;
&lt;/rss&gt;
&lt;/response&gt;


</pre>
    </div>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.21. Pingback API</h3>
<p>
The Pingback is another form of trackback, just protocol and parameters are different.
In Pingback is used XML-RPC instead of REST model. Also the requester sends his own and
target url as part of request.
</p>
<p>
The implementation consists of &quot;pingback.ping&quot; XML-RPC method and auto-discovery
in blog home page.
</p>
<p>
&quot;pingback.ping&quot; (in sourceURI varchar, in targetURI varchar) return varchar
</p>
<p>
The sourceURI is URL for page of requester; targetURI is page on the target server.
The pingback.ping method will retrieve sourceURI and will record the data as trackback
it targetURI exists on same server and it&#39;s valid permaLink.  On success it returns a
string &#39;Success&#39; otherwise XML-RPC error code. See also external reference &quot;http://www.hixie.ch/specs/pingback/pingback&quot; .
</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.22. E-mail Notifications</h3>
<p>The blog implementation offers a two kind of notifications: notify via e-mail a blog owner when a comment is posted; or  one could subscribe to receive blog posts via e-mail. Both notifications are disabled by default and can be turned on using Weblog UI. When this flag is on a scheduled job will send e-mail to the blogger for every new comment posted to the given blog.</p>
<p>The blog owner notification can be turned on as setting BI_COMMENTS_NOTIFY to 1 in table SYS_BLOG_INFO for corresponding blog entry. Other way is to use Weblog settings UI.</p>
<p>If blog owner decide, can define a notification route. To do that he can add a routing job
of type SMTP to the routing table. See &quot;Blog Upstreaming&quot; discussed earlier in this chapter how to do that.
Also it&#39;s possible via Weblog settings UI to add such route via &quot;Notification&quot; link.
Note that when define such route , better practice is to designate a category which to be considered as
for subscription.
</p>
<p>
Once such routing job is defined for given blog, users can subscribe and therefore receive e-mails for
posts which blogger assign to a category for notification.
</p>
  <br />
  <a name="blognotifcomments" />
    <h3>12.7.23. Comments tracking options</h3>
      <p>
	  When a blogger enable E-mail Notification for comments on his/her
	  blog, the following options are available: </p>
      <p>HTML - the notification will be sent in HTML format, the message
	  will contain URLs to the post and comment API. Reply to this
	  mail will add new comment, if mail-gateway is enabled by Web
	  administrator.</p>
      <p>HTML Form - this option will send an email containing comment and
	  form, which could be used to invoke directly comment API from mail
	  agent (if it supports posting a form)</p>
      <p>Text - this option is same as first, but uses plain text instead
	  of HTML encoding.</p>
      <p>combined : combines all of the above as attachments.</p>
  <br />

  <a name="xmlstoragesystem" />
    <h3>12.7.24. Subscription Harmonizer API</h3>
<p>Considering situation where blogger have many subscribed channels and wish these to be in sync
on different places it usually subscribe/unsubscribe in home, work public blog.
To be easiest for one to keep all mirrored blog instances (see Upstreaming discussed above) to have
same channel subscription can be used Subscription Harmonizer API.
This API consist of four methods available via XML-RPC , so developers can use them to put in sync
blogger channel subscriptions.
</p>
<p>&quot;subsHarmonizer.setup&quot; (in username varchar, in &quot;password&quot; varchar, in array any)
This is used to setup on server channels which are subscribed locally. The user authenticates
using name and password and sends to server list of RSS URLs  in &quot;array&quot; parameter.
This action is usually performed once , on initial subscription.
</p>
<p>&quot;subsHarmonizer.subscribe&quot; (in username varchar, in &quot;password&quot; varchar, in array any)
This is used when in local blog instance blogger makes new subscription(s), the &quot;array&quot; will contains only
entries have been added since last call to that or subsHarmonizer.setup call.
The target server will resolve URL list and will make records in SYS_BLOG_CHANNEL and SYS_BLOG_CHANNEL_INFO tables.
</p>
<p>&quot;subsHarmonizer.unsubscribe&quot; (in username varchar, in &quot;password&quot; varchar, in array any)
This function is opposite of subsHarmonizer.setup , it is used when blogger unsubscribe from some channels.
The server action is to remove channel subscriptions from blog instance. Note that in this case server keeps
channel definition , so it can be re-used when another user get subscribed to it, this is to minimize bandwidth consumption for channel characteristics retrieval.
</p>
<p>All of the above returns boolean.</p>
<p>&quot;subsHarmonizer.startup&quot; (in username varchar, in &quot;password&quot; varchar)
This function is used from blog application to get from server list of
subscriptions which are currently registered. In that case blog application
uses the array of URLs returned to set it&#39;s local list of channels.
</p>
  <br />

  <a name="moblog" />
    <h3>12.7.25. Mobile Blogging (Moblog)</h3>
    <p>The Mobile blogging (moblog) is synonym of messages containing images made via mobile devices
    (such as mobile telephones etc.) with ability to record a image and send them via SMTP.</p>

    <p>Moblog&#39;&#39;ing has become popular as means for users to easily, automatically and immediately
     post text and images back to their blog site what ever their location.</p>

    <p>The Virtuoso server can act as mail server (see Storing Email in Virtuoso chapter,
    and howto configure mail servers in same chapter). Thus it&#39;&#39;s possible to capture
    mails sent via mobile devices and expose in a Blog. But main problem remains: SMTP have no
    authentication. So this functionality is achieved via UI which shows all existing mail messages
    sent via mobile devices and containing a images, allowing to the blog owner to decide which image
    to go to his/her blog. As an alternative post can be automatic if blogger check this option. </p>

    <p>Mobile blogging (Moblog) can be configured via the Virtuoso blog UI by selecting the
    Moblog link under the Configuration section as indicated in the diagram below: </p>

    <table class="figure" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td>
          <img alt="Blog page" src="../images/moblog.gif" />
     </td>
    </tr>
    <tr>
        <td>Figure: 12.7.25.1. Blog page</td>
    </tr>
    </table>

    <p>The Moblog configuration page enables the details of the POP3 server from
    which messages are to be retrieved from is located  as indicated in the diagram below:</p>

    <table class="figure" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td>
          <img alt="Blog page" src="../images/moblogconfig.gif" />
     </td>
    </tr>
    <tr>
        <td>Figure: 12.7.25.2. Blog page</td>
    </tr>
    </table>


    <ul>
          <li>
        <strong>Server Address and Port </strong>- Hostname and port number of  the POP3 Mail Server.</li>
          <li>
        <strong>Account Username</strong> - username of POP3 Mail server account.</li>
          <li>
        <strong>Account Password </strong>- username of POP3 Mail server account.</li>
          <li>
        <strong>Enable Automatic Moblogging</strong> - enabled automatic posting of messages to Blog site.</li>
          <li>
        <strong>Allowed MIME types</strong> - mime type of messages to be retrieved form POP3 server, which can be of type image, vidoe or audio.</li>
          <li>
        <strong>Set</strong> - this button sets the POP3 mail server setting entered above.</li>
          <li>
        <strong>Fetch</strong> -  this button retrieves available moblog messages from the POP3 mail server.</li>
    </ul>

    <p>Moblog can handle different types of attachments, this depends of list of MIME type
    patterns (SQL like syntax), which blogger specifies in Moblog UI. Further any new incoming
    message containing attachment matching any of that list will be exposed in the UI for posting,
    or it will be posted automatically if &#39;&#39;Automatic post&#39;&#39; option is checked. </p>

    <p>Note: feeding a mail box can also be done via &quot;Mail&quot;, &quot;Get Mail with
    POP3&quot; Admin UI utility. In this case blogger authenticates in this utility, and feeds
    it&#39;&#39;s local mailbox from some POP3 server. The consequential actions to put a message
    as blog message are same as described above. </p>

    <p>As alternative to feeding via own POP3 account, Moblog message can be sent to special
    mail-gateway account. Such account can be set from Web admin only and can be used from all
    bloggers to pass Moblog messages to their blogs. Only requirement in that case is blogger to
    include &#39;&#39;@@blogId@@=[blog Id]&#39;&#39; string as a single line whenever in the
    message body. Further mail-gateway processing will detect such rule and will expose the
    message in the Moblog UI, or automatic post will be performed. </p>

  <br />
  <a name="blogxmltemplate" />
    <h3>12.7.26. Posting a dynamic content</h3>
      <p>
	  The Virtuoso blogging system allows to insert into a post a result from SQL, XPATH or XQuery expressions.
	  The way this can be done is to have a SQL access enabled for the Web user making the post,
	  so such blogger can insert into a post body (note that this is not available for title) a XMLTemplate.
	  (see &quot;XML Templates&quot; for reference)
	  Then at the render time the template will be executed on behalf of the blogger who is made the post
	  and result will be shown. There is no limitation how many XML Templates can be included in a single post.
	  Please note that bloggers without SQL access cannot do such posts. Also the SQL granting rules
	  will be applied when XML Template is executed.
      </p>
      <p>
	  The following will render a simple table containing list of Demo.demo.Shippers table from Demo database.
      </p>
<div>
      <pre class="programlisting">
	    &lt;table border=&quot;1&quot;&gt;
		&lt;sql:query xmlns:sql=&quot;urn:schemas-openlink-com:xml-sql&quot; &gt;
		    select 1 as tag , null as parent, CompanyName as [tr!1!td!element]
		    from Demo.demo.Shippers
		    for xml explicit
		&lt;/sql:query&gt;
	    &lt;/table&gt;
	    </pre>
    </div>
	<p>
	    The following post will render a table containing a names of people
	    which is organized in simple OPML file (located in the tutorial system)
	    using XQuery.
	    (See also the tutorial demo BLOG_QUERY)
	</p>
<div>
      <pre class="programlisting">
	    &lt;div&gt;
		&lt;sql:xquery  xmlns:sql=&quot;urn:schemas-openlink-com:xml-sql&quot;
		    sql:context=&quot;http://localhost:8890/tutorial/apps/blog_query/&quot;&gt;
		    &lt;![CDATA[
		    &lt;table border=&quot;1&quot;&gt;
			{ for $o in document (&quot;opml.xml&quot;)//outline
			   return &lt;tr&gt;&lt;td&gt;{ string ($o/@text) }&lt;/td&gt;&lt;/tr&gt;
			}
		    &lt;/table&gt;
		    ]]&gt;
		&lt;/sql:xquery&gt;
	    &lt;/div&gt;
</pre>
    </div>
  <br />
  <a name="blognotifservices" />
    <h3>12.7.27. Notification Services</h3>
      <p>
	  This UI is used to define a mail routing job.
	  So it is used for notification of blog visitors
	  for post updates. If administrator define a mail
	  target and refresh interval; visitors to the
	  given blog can subscribe to the &#39;mailing list&#39; for
	  blog updates.
	  Once visitor have subscribed, on every new post
	  an email will be sent to he/she.

	  If the mail is deleted, the mailing list for blog update
	  notification will be canceled.
      </p>
  <br />
  <a name="blogwaprender" />
    <h3>12.7.28. Rendering the RSS feed in WML format</h3>
      <p>
	  The user&#39;s blog RSS file could be rendered in WML format
	  for accessing with mobile devices. To do that
	  built-in PL post-processing hook for blog virtual directory is
	  introduced  (DB.DBA.BLOG_RSS2WML_PP). It working together with
	  a XSL-T style-sheet which converts the RSS in WML format.
      </p>
      <p>
	  To enable this functionality the blogger should enter &#39;*wml-default*&#39; as
	  RSSFilter option on settings page. Or if he/she has an own XSL-T
	  filter for WML can enter its URL instead.
      </p>
      <p>
	  The  DB.DBA.BLOG_RSS2WML_PP post-processing hook:
      </p>
<div>
      <pre class="programlisting">
create procedure DB.DBA.BLOG_RSS2WML_PP ()
  {
    declare accept, upar, pars any;
    declare lines any;
    lines := http_request_header ();
    accept := http_request_header (lines, &#39;Accept&#39;);
    if (not isstring (accept))
      accept := &#39;&#39;;
    upar := http_request_get (&#39;QUERY_STRING&#39;);
    if (regexp_match (&#39;text/vnd\.wap\.wml&#39;, accept))
      {
	if (http_path () like &#39;%/rss.xml&#39;)
	  {
	    declare opts, filt, bid any;
	    whenever not found goto exitp;
	    select top 1 BI_BLOG_ID into bid from SYS_BLOG_INFO where
	    http_path () like BI_HOME || &#39;%&#39; order by length (BI_HOME) desc;
	    select deserialize (blob_to_string (BI_OPTIONS)) into opts from SYS_BLOG_INFO where BI_BLOG_ID = bid;

	    if (not isarray(opts))
	      opts := vector ();

	    filt := get_keyword (&#39;RSSFilter&#39;, opts, &#39;&#39;);

	    if (filt = &#39;*wml-default*&#39;)
	      filt := &#39;http://local.virt/rss2wml.xsl&#39;;

	    if (not isstring (filt) or not xslt_is_sheet (filt))
	      goto exitp;

	    if (length (upar) = 0)
	      {
                http_xslt (filt);
	      }
	    else
	      {
		declare rss, xt, xsl any;
		rss := http_get_string_output ();
		xt := xml_tree_doc (rss);
		http_rewrite ();
		xsl := xslt (filt, xt, vector (&#39;id&#39;, upar));
		http_value (xsl, null);
	      }
	    http_header (&#39;Content-Type: text/vnd.wap.wml\r\n&#39;);
	    exitp:;
	  }
      }
    return;
  }
;
</pre>
    </div>
      <p>
	  The rss2wml.xsl style sheet:
      </p>
<div>
      <pre class="programlisting">
&lt;?xml version=&#39;1.0&#39;?&gt;
&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;
  xmlns:vb=&quot;http://www.openlinksw.com/weblog/&quot;&gt;
  &lt;xsl:output method=&quot;xml&quot; indent=&quot;yes&quot; doctype-public=&quot;-//WAPFORUM//DTD WML 1.1//EN&quot; doctype-system=&quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot; media-type=&quot;text/xml&quot;/&gt;
  &lt;xsl:param name=&quot;id&quot; /&gt;
  &lt;xsl:template match=&quot;/&quot;&gt;
    &lt;wml&gt;
      &lt;card id=&quot;card1&quot;&gt;
	&lt;xsl:apply-templates /&gt;
      &lt;/card&gt;
    &lt;/wml&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;item&quot;&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test=&quot;boolean($id!=&#39;&#39;)&quot;&gt;
	&lt;xsl:if test=&quot;substring-after(link,&#39;?&#39;) = $id&quot;&gt;
	  &lt;p&gt;
	    &lt;xsl:value-of select=&quot;vb:tidy_xhtml (string (description), &#39;*default*&#39;)&quot;
	      disable-output-escaping=&quot;yes&quot;/&gt;
	    &lt;br/&gt;
	    &lt;xsl:if test=&quot;preceding-sibling::item&quot;&gt;
	      &lt;a&gt;
		&lt;xsl:attribute name=&quot;href&quot;&gt;rss.xml?&lt;xsl:value-of select=&quot;substring-after(preceding-sibling::item/link,&#39;?&#39;)&quot;/&gt;&lt;/xsl:attribute&gt;PREVIOUS&lt;/a&gt;&lt;br /&gt;
	    &lt;/xsl:if&gt;
	    &lt;xsl:if test=&quot;following-sibling::item&quot;&gt;
	      &lt;a&gt;
		&lt;xsl:attribute name=&quot;href&quot;&gt;rss.xml?&lt;xsl:value-of select=&quot;substring-after(following-sibling::item/link,&#39;?&#39;)&quot;/&gt;&lt;/xsl:attribute&gt;NEXT&lt;/a&gt;
	    &lt;/xsl:if&gt;
	  &lt;/p&gt;
	&lt;/xsl:if&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
	&lt;p&gt;
	  &lt;a&gt;
	    &lt;xsl:attribute name=&quot;href&quot;&gt;rss.xml?&lt;xsl:value-of select=&quot;substring-after(link,&#39;?&#39;)&quot;/&gt;&lt;/xsl:attribute&gt;
	    &lt;xsl:value-of select=&quot;title&quot;/&gt;
	  &lt;/a&gt;
	&lt;/p&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match=&quot;text()&quot;/&gt;
&lt;/xsl:stylesheet&gt;
</pre>
    </div>
  <br />

  <table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="asmxhosting.html" title="ASMX Web Service Hosting">Previous</a>
          <br />ASMX Web Service Hosting</td>
     <td align="center" width="34%">
          <a href="webappdevelopment.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="servphpext.html" title="Deploying PHP Applications">Next</a>
          <br />Deploying PHP Applications</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>