About to change (2)

I moved the blog’s from Mov­able Type to NetKer­nel, for the moment the steps I did were:

  • tidy-​up the static con­tent gen­er­ated by Mov­able Type
  • put all the files in a NetKer­nel module
  • wrote a XSLT 2.0 trans­form­a­tion to apply the new template

Then I annot­ated the tem­plate with hAtom micro­format and RDFa, the goal was to yield the same RDF triples from a blog entry wherever I was extract­ing the RDFa or I was trans­form­ing hAtom to Atom (via Robert Bach­mann’s hAtom2Atom) and then Atom to RDF (via Masahide Kan­zaki’s atom2rdfs).

The res­ult for this entry Semantic Web Logo looks like this (via W3C’s RDFa Dis­til­ler). For example that page’s micro­formats and RDF do also validate:

Hav­ing all the blog con­tent avail­able as RDF, I was able to store it in a Talis Plat­form, and by set­ting accord­ingly the atom:content, dc:description and dc:title in both the field pre­dic­ate map and the query pro­file; all this data became instantly search­able, for example see this search for ‘semantic.’

Addi­tion­ally I recre­ated the Atom feed by query­ing the metabox via SPARQL and trans­form­ing the res­ults, this was very easy to setup as a pipeline in NetKernel:

<?xml version="1.0" encoding="UTF-8"?>
<idoc>
	<seq>
		<instr>
		  <type>httpPost</type>
		  <url>http://api.talis.com/stores/lgridinoc-dev2/services/sparql</url>
		  <nvp>
			<nvp>
				<query>
<![CDATA[
PREFIX	rdf:	<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX 	rss:  	<http://purl.org/rss/1.0/>
PREFIX 	atom:  	<http://www.w3.org/2005/Atom#>
PREFIX	dc:		<http://purl.org/dc/elements/1.1/>

SELECT 	?s ?updated ?title ?desc ?content
WHERE
{ 	?s	rdf:type		rss:item 	;
   		atom:updated 	?updated 	;
		dc:title		?title		;
		dc:description	?desc		;
		atom:content	?content
}
ORDER BY DESC(?updated) LIMIT 10
]]>
				</query>
			</nvp>
		  </nvp>
		  <target>var:sparql</target>
		</instr>
		<instr>
		  <type>xslt2</type>
		  <operand>var:sparql</operand>
		  <operator>ffcpl:/resources/atom.xsl</operator>
		  <target>this:response</target>
		</instr>
		<instr>
			<type>cast</type>
			<operator>
				<cast>
					<mimetype>application/atom+xml</mimetype>
				</cast>
			</operator>
			<operand>this:response</operand>
			<target>this:response</target>
		</instr>
	</seq>
</idoc>

Next, I have to address link­backs, com­ments and new entry cre­ation. To be continued…