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

(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  

The XML sequence file that drives the operation is @  
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"  
     <semweb:select uri="{query-string:foaf-uri}">
       <semweb:process />

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 @  
though if the interest exists, I would look through the entire  
folder/subfolder of  
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. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |  
Received on Tuesday, 12 June 2007 21:42:44 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:01 UTC