[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RDF graph to SVG force-directed layout

Subject: 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
 RDF graph to SVG force-directed layout
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.