RE: TRANSFORM SVG2RDF

>OK, maybe this question is not for this list but It's my best option.

It's about RDF!

>  I have started to develop a web project to manage and save the bookmarks
>over internet. The idea is to represent them as a semantic net and manage
>the whole application as a gpaphic editor but I would like to save
>the whole
>graphic (the whole semantic net) as an RDF file.

Heh - this is one of the facilities I plan to offer in 'Ideagraph'.

>   At the beginnig I thought to use the framework JHotdraw for the graphic
>interface and Jena for the RDF part, but I found a nice framework to
>generate the graphics called JGraph
>(http://jgraph.sourceforge.net/) which,
>from the graphic, can generate and svg file, and I change my mind to use
>JGraph to generate an SVG and transform that svg (using XSLT) to
>an RDF file
>(mainly because the backend client is an applet and the size of JHotdraw
>plus Jena is really significant if you compare it with JGraph).

I've not looked at JGraph yet (now downloading, thanks for the pointer) but
am familiar with JHotdraw & Jena - well, yes, they are a bit big for an
applet ;-) For my purposes I'm currently using Jena (though that may change)
and homespun stuff quite similar to JHotDraw, but I'm looking at a desktop
app so the size isn't quite the same issue (though I'm now rebuilding with
an eye on the size -  the library dependencies of the prototype were over
10MB).

>    Recently I joined to this list and I started to read something about
>that I shouldn't use XSLT to generate RDF, but I can't see the  reason (my
>poor brain ;) so How I should focus my project?, is It posible from a SVG
>file to generate an RDF? , am I really lost?, I really would
>appreciate any
>sugestions or ideas.

I think the SVG -> RDF via XSLT is doable in principle, but don't forget
you'll need an XSLT engine so that might mean added weight. It's a matter of
programming taste, but I don't see why the data model shouldn't be specified
in RDF and exposed declaratively to SVG or Java graphics using XSLT. (btw,
one of the precursors of what I'm working on was RDF2SVG [4], though the
processing was done programmatically rather than using XSLT). If you do
decide to go the XSLT route, you may find the XSLT RDF -> triples parser at
[5] interesting.

On one level, the approach you're talking about is rather back to front, as
SVG is primarily a graphic language and you're talking of saving the graphic
as RDF. If I were you I'd stand back from this and try and look at it from a
Model-View-Controller angle. The view could be made of Swing objects, or it
could be done using SVG. Re. the model - you want RDF, but is this the best
way of modelling or maybe a simpler, generic node & arc graph model might be
better, with RDF being another 'view' (i.e. import/export). Do you even need
a graph model? I'm guessing yes from your description, but it may be that a
(possibly xlink decorated) DOM tree might cover your requirements.
Re. controller, well the implementation will depend on the model and view,
but a critical point would be whether to use Java or something like SVG
(with its own scripting). Personally I'm using Java, but then I've got the
relative luxury of not worrying too much about app size.
Don't forget that you've also got the possibility of doing some of the work
server-side.

Some other bits of kit that might be useful are Jim Ley's SVG RDF editor [1]
(this would probably be the neatest lightweight solution) and Touchgraph [2]
has a 'LinkBrowser' applet that sounds related to what you have in mind,
though without the RDF (this would probably be the easiest solution). I may
be wrong, but I think Alex Shapiro originally based his TouchGraph code on
the example at [3]. (Incidentally, Murray Altheim is doing some work with
TouchGraph + Topic Maps, though last time I looked he hadn't released
anything). Alternately you could build the whole lot from scratch (this
should be the most elegant solution ;-)


I'm very interested in hearing about how you get on.

Cheers,
Danny.

[1] http://www.jibbering.com/

[2] http://www.touchgraph.com/

[3] http://java.sun.com/applets/jdk/1.1/demo/GraphLayout/example4.html

[4] http://www.isacat.net/2002/svolgo/rdf2svg.htm

[5] http://www.w3.org/2001/12/rubyrdf/xsltrdf/README.html
---
Danny Ayers
<stuff> http://www.isacat.net </stuff>

Idea maps for the Semantic Web
http://ideagraph.net

Received on Wednesday, 9 October 2002 06:48:19 UTC