Hi David, folks,

cc'ing [EMAIL PROTECTED] (the Talis Platform dev list - please
join if you haven't already ;-), after the questions I'll describe
what I'm up to...

I think I've got most of the code I need in place for
SPARQL=>XSLT=>Timegrid, but there's a little info I'm lacking (at
least one reason it doesn't yet work :-), and I need to do quite a bit
of tidying...

I forgot to mention earlier that I'm using XML data with Timegrid -
I'd already started the XSLT before I saw the JSON examples. So the
first question is how do I say the dates are ISO?

The data I've got right now looks like this:

<data xmlns:xs="http://www.w3.org/2001/XMLSchema#";
      wiki-url="http://simile.mit.edu/shelf/";
      wiki-section="Simile JFK Timeline"
      dateTimeFormat="iso8601">
   <event start="2007-09-26T09:40:32+01:00" title="make executable jar "
          isDuration="False">
// some text
</event>
...

it's live at : http://tinyurl.com/yuff5v

the Timegrid should show at:
http://danja.talis.com/timegrid

Source is at:
http://n2.talis.com/svn/playground/danja/forms/timegrid/index.php
and nearby.

As you can see, I've done a bit of (unsuccessful) guesswork, so the
second question is: what do I need to do to get it to work? :-)

(btw, there's an absolute reference to a static.simile url - the ajax
kit - in timegrid-api.js)

----------------------------

Being for the benefit of n2-dev :

what I'm trying to do is run a SPARQL query against my online store
(which contains dated resources, mostly the output of my
work-in-progress activity logger thingy), run the results through XSLT
and render it using Timegrid : http://simile.mit.edu/timegrid/

I'm gluing everything together with fairly trivial (!) PHP.

So the query is:

PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?event ?date ?title ?property ?value

WHERE
{
   ?event dc:date ?date ;
        dc:title ?title;
       ?property ?value .
}
ORDER BY DESC(?date)

which is live at http://tinyurl.com/2mzkdm
(or if you copy & paste, at http://danja.talis.com/sparql-editor.html )

The property/value bit isn't really used yet, right now I've just them
dumped into the Timegrid data as a placeholder in lieu of a more
useful description.

the XSLT takes the results and (not quite) transforms them to what
Timegrid understands.
http://danja.talis.com/timegrid/sparql2timegrid.xsl

The plan is to use the query as a URI, pass that to an online XSLT
service - making a longer URI, which is the one shortened to
http://tinyurl.com/yuff5v

I've not yet the URL encoding/XML escaping quite right in the PHP
(trivial? pah!) , so for now I've just bunged in the tinyurl.

btw, the Talis XSLT service
(http://n2.talis.com/wiki/Transformation_Service) chokes on the
SPARQL-embedded URI (probably encoding issues again), so I'm using the
W3C service at: http://www.w3.org/2001/05/xslt

Cheers,
Danny.

-- 

http://dannyayers.com
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to