Subject: [xsl] RDF graph to SVG force-directed layout From: "Martynas Jusevičius martynas@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 14 Oct 2020 21:00:11 -0000 |
Hi, could anyone suggest any optimizations to this stylesheet that transforms a graph encoded as RDF/XML to an SVG directed graph layout: https://github.com/AtomGraph/Web-Client/blob/develop/src/main/webapp/static/com/atomgraph/client/xsl/converters/RDFXML2SVG.xsl Output example: https://twitter.com/namedgraph/status/1316476355874304001 The problem is that it's quite slow: <100 nodes and 5 steps take a few minutes running on Saxon-JS 2 in Firefox or Chrome. It's based on a paper on force directed layout in XSLT: "GraphML Transformation": http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.182.3680&rep=rep1&type=pdf#page=58 The algorithm: 1. position resource nodes (optionally also literals) randomly. (TO-DO: position on an ellipse?) 2. move nodes in a loop using the force-directed algorithm 3. draw lines between the nodes, calculating the correct intersection with the node border Note: only "flat" RDF/XML (properties grouped into descriptions; no nesting) is supported. It's called RDFXML_PLAIN in Jena. If anyone would like a sample file, I can easily provide :) Martynas atomgraph.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [Ann] Webinar: Introduction t, Octavian Nadolu octa | Thread | Re: [xsl] RDF graph to SVG force-di, Liam R. E. Quin liam |
[xsl] [Ann] Webinar: Introduction t, Octavian Nadolu octa | Date | Re: [xsl] RDF graph to SVG force-di, Liam R. E. Quin liam |
Month |