|
Subject: Re: [xsl] xml to svg graphs From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 28 Jan 2026 14:40:41 -0000 |
We used the DotML interface to GraphViz to produce the diagrams in early versions of the XSLT 3.0 spec, see for example https://www.w3.org/TR/2010/WD-xslt-21-20100511/#tracing-variable-references Done with a simple transformation from a logical XML representation of the graph to DotML which then generates the SVG. Michael Kay Saxonica > On 28 Jan 2026, at 14:30, BR Chrisman brchrisman@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I remember doing an xslt conversion of an xml dump (xml output of an abstract syntax tree from a compiler) to 'dot' for graphviz, which output svg... .that's not straight-to-cvg though. > Not sure that helps, but I had very good results from graphviz with that. > > On Wed, Jan 28, 2026 at 6:13b/AM Dave Pawson dave.pawson@xxxxxxxxx <mailto:dave.pawson@xxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >> Sorry, my data is far from a directed graph. >> This is one I did get to work, a simple block graph. >> >> regards >> >> On Wed, 28 Jan 2026 at 14:09, Martynas JuseviD ius martynas@xxxxxxxxxxxxx <mailto:martynas@xxxxxxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >>> Well, the advantage of RDF is that it's a standard :) >>> https://www.w3.org/TR/rdf11-primer/ >>> >>> The downside is that its XML-based format (RDF/XML) is rather convoluted. >>> >>> But you don't need to write RDF/XML by hand - you can use Jena's CLI to transform from a more human-readable Turtle format to RDF/XML. >>> >>> Or heck, I think you could give your names/values data to an LLM and ask it to produce an RDF equivalent :) >>> >>> On Wed, Jan 28, 2026 at 3:05b/PM Dave Pawson dave.pawson@xxxxxxxxx <mailto:dave.pawson@xxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >>>> Hi Martynas. >>>> The simplicity (and coverage) of Jakobs was ( for me) its advantage? >>>> Two simple lists >>>> <names/> >>>> <values/> >>>> with a whole host of variants. >>>> Not the same 'graphs' as RDF? >>>> >>>> regards >>>> >>>> On Wed, 28 Jan 2026 at 13:56, Martynas JuseviD ius martynas@xxxxxxxxxxxxx <mailto:martynas@xxxxxxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >>>>> Hey Dave, >>>>> >>>>> Not a direct replacement, but FWIW I have a stylesheet that transforms RDF graphs (via the RDF/XML format) to force-directed SVG layouts: >>>>> https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/co m/atomgraph/client/xsl/converters/RDFXML2SVG.xsl >>>>> >>>>> The RDF/XML structure might be specific to "normalised" Jena's RDF/XML output (can't exactly recall now). >>>>> https://jena.apache.org/documentation/tools/#riot-and-related >>>>> >>>>> Martynas >>>>> atomgraph.com <http://atomgraph.com/> >>>>> On Wed, Jan 28, 2026 at 2:48b/PM Dave Pawson dave.pawson@xxxxxxxxx <mailto:dave.pawson@xxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >>>>>> A long time ago... >>>>>> Jakob wrote some code, now resident (rotting?) >>>>>> on Google code. >>>>>> https://code.google.com/archive/p/graph2svg/downloads >>>>>> >>>>>> At the time he use fxsl and exsl for the math(s). >>>>>> >>>>>> IMHO this is well worth bringing up to date. >>>>>> I asked Jakob and received no reply. >>>>>> >>>>>> Saxon math 'extension' only lacks abs, from >>>>>> my early trials? >>>>>> >>>>>> If anyone with a mathematical bent has time >>>>>> to do the xslt world a favour, I would certainly >>>>>> appreciate it. >>>>>> >>>>>> regards >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Dave Pawson >>>>>> XSLT XSL-FO FAQ. >>>>>> Docbook FAQ. >>>>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> >>>>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3206323> (by email <>) >>>>> >>>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> >>>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2607481> (by email <>) >>>> >>>> >>>> >>>> -- >>>> Dave Pawson >>>> XSLT XSL-FO FAQ. >>>> Docbook FAQ. >>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> >>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3206323> (by email <>) >>> >>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> >>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2607481> (by email <>) >> >> >> >> -- >> Dave Pawson >> XSLT XSL-FO FAQ. >> Docbook FAQ. >> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> >> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/965995> (by email <>) > > XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3500899> (by email <>) o?<
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] xml to svg graphs, BR Chrisman brchrism | Thread | Re: [xsl] xml to svg graphs, Paul Tyson phtyson@x |
| Re: [xsl] xml to svg graphs, Dave Pawson dave.paw | Date | Re: [xsl] xml to svg graphs, Michael Kay michaelk |
| Month |