Blog demo tutorial
Making a dynamic blog posts Making a dynamic blog posts using XML templates

## Overview

- This demo makes a Weblog and posts into it using Metaweblog API two dynamic posts
- The dynamic posts contains XML template(s) which will be executed at render time.
- The first post makes a SQL quesry on Demo Database table 'Shippers' and inserts a table into the user's weblog.
- The second post contains a XML Template containing a XQuery statement. It will render a table containing names from simple opml.xml file.
- The following is a post content containing a XML Template with SQL Query:

      	    <table border="1">
      		<sql:query xmlns:sql="urn:schemas-openlink-com:xml-sql" >
      		    select 1 as tag , null as parent, CompanyName as [tr!1!td!element]
      		    from Demo.demo.Shippers
      		    for xml explicit
      		</sql:query>
      	    </table>

- The following is a post content containing a XML Template with XQuery:

      	    <div>
      		<sql:xquery  xmlns:sql="urn:schemas-openlink-com:xml-sql"
      		    sql:context="http://localhost:8890/tutorial/apps/blog_query/">
      		    <![CDATA[
      		    <table border="1">
      			{ for $o in document ("opml.xml")//outline
      			   return <tr><td>{ string ($o/@text) }</td></tr>
      			}
      		    </table>
      		    ]]>
      		</sql:xquery>
      	    </div>

- The result from execution can be seen at http://host:port/weblog/bloguser/bloguser-blog-0. Note that demo's initial state MUST be set before hitting this link.