W3C home > Mailing lists > Public > semantic-web@w3.org > June 2007

Re: SemWeb RDF C# Library version 1.0

From: M. David Peterson <m.david@xmlhacker.com>
Date: Tue, 12 Jun 2007 15:42:29 -0600
To: "Joshua Tauberer" <jt@occams.info>
Cc: "Andrew Matthews" <Andrew.Matthews@readify.net>, "semantic-web at W3C" <semantic-web@w3c.org>
Message-ID: <op.tttvw3wlgb2xtc@m-david-petersons-computer.local>

On Tue, 12 Jun 2007 08:25:48 -0600, M. David Peterson  
<m.david@xmlhacker.com> wrote:

> Now comes the fun part

http://personplacething.info/service/semweb/?debug=true&foaf-uri=http://planet.xsltransformations.com/foafroll.xml  
(view source)

It's only a simple proof-of-concept > If fact, it's a horribly hacked-up  
proof-of-concept as I basically took the sample from  
http://personplacething.info/doc/semweb/selecting.html and converted it  
into a class with a single static method that takes an HttpResponse and a  
URI string, and then calling that function from within a Saxon on  
.NET-based XSLT 2.0 transformation file, writing the result directly to  
the output stream and then handing back control to the transformation  
which has no clue anything has been written outside of its control.  In  
other words, this is exactly what you *SHOULD NOT* be doing with an XSLT  
extension function, but I was more interested in getting something quick  
and dirty working and then taking it from there.  As such, please excuse  
the horrific hack! :D

The code is checked into  
http://personplacething-info.googlecode.com/svn/trunk/public_web/

The XML sequence file that drives the operation is @  
http://personplacething-info.googlecode.com/svn/trunk/public_web/service/semweb/service.op  
and looks like,

---
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/transform/base.xslt"?>
<service:operation xmlns:at="http://atomictalk.org"  
xmlns:metadata="http://xameleon.org/service/metadata"  
xmlns:header="http://xameleon.org/service/http/header"  
xmlns:service="http://xameleon.org/service"  
xmlns:operation="http://xameleon.org/service/operation"  
xmlns:semweb="http://xameleon.org/service/semweb"  
xmlns:param="http://xameleon.org/service/session/param">
   <operation:semweb>
     <semweb:select uri="{query-string:foaf-uri}">
       <semweb:process />
     </semweb:select>
   </operation:semweb>
</service:operation>
---

It should be fairly obvious what is taking place, but to make things more  
obvious the above XML file sits at a given URI-endpoint (in this case  
using the filename service.op which is set within the Apache and ASP.NET  
config files to serve up as a default file), invokes a 'semweb' operation  
called 'select', takes the query-string value of 'foaf-uri' and invokes  
the process suggested in the above 'select' sample.  Any valid foaf feed  
set as the value to the 'foaf-uri' query-string variable should be  
processed and the hacked-up result output to the response stream.

The related XSLT file is located @  
http://personplacething-info.googlecode.com/svn/trunk/public_web/transform/semweb.xslt  
though if the interest exists, I would look through the entire  
folder/subfolder of  
http://personplacething-info.googlecode.com/svn/trunk/public_web/transform  
to gain a deeper understanding of what's really going on behind the scenes.

Now that the proof of concept is in place, it's time to do something real  
with this.  Keeping in mind that there is access to XSLT 2.0, XPath 2.0,  
XQuery 1.0, SPARQL, and everything else that comes along for the ride with  
Joshua's SemWeb library, as well as access to everything you would  
normally have access to on any given ASP.NET web application server inside  
of the transformations and queries, and ideas from the community at large  
on a good "get my feet wet by diving into the pool head first" focus for  
taking this and doing something useful with it?

-- 
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |  
http://dev.aol.com/blog/3155
Received on Tuesday, 12 June 2007 21:42:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:57 UTC