| Newsgroups |
gmane.text.xml.xsl.general.mulberrytech |
| Message-ID |
<[email protected]> |
Hi Paul,
I wonder if that JSON-LD/d3.js code can be found anywhere? :)
Martynas
atomgraph.com
On Thu, Oct 15, 2020 at 3:16 AM Paul Tyson [email protected]
<[email protected]> wrote:
>
> I also thought of d3.js, but don=E2=80=99t know if it fits your overall a=
rchitecture or data flow.
>
> Years ago I experimented with json-ld from fuseki into a d3 client that r=
endered very nice graphs. It showed great promise. But as it had no xsl, th=
at solution would be off-topic for this list.
>
> Regards,
> =E2=80=94Paul
>
> > On Oct 14, 2020, at 17:37, Liam R. E. Quin [email protected] <xsl-l=
[email protected]> wrote:
> >
> > =EF=BB=BFOn Wed, 2020-10-14 at 21:01 +0000, Martynas Jusevi=C4=8Dius
> > [email protected] wrote:
> >> Hi,
> >>
> >> could anyone suggest any optimizations to this stylesheet that
> >> transforms a graph encoded as RDF/XML to an SVG directed graph
> >> layout:
> >
> > without looking in detail - are you able to use d3.js in the browser to
> > do the fotce calulation part? It might not be faster but watching the
> > SVG objects move gradually into equilibrium has its own fascination.
> >
> > Most of these algorithms are likely to be at best O(n=C2=B2) =C3=97 Nit=
erations,
> > so there's some inherent slowness.
> >
> > Looking slightly more closely -
> > * consider using xsl:iterate instead of a recursive template at line
> > 282;
> > * run the stylesheet on the command-line and have Saxon write out
> > profiling information to see where the time goes
> > * add as=3D to any templates * variables that don't already have them
> > * use on-no-match=3D"shallow-copy" on an xsl:mode declaration for
> > ac:SVTPositioning and delete the template on line 303
> > * consider using maps rather than elements during positioning, as
> > creating DOM elements in a browser is likely to be slow
> >
> > But an algorithm with worse than n^2 complexity is always likely to
> > have problems as n increases - the trick (as with e.g. QuickSort) is to
> > remember complexity is usually an average best case, and find values
> > for which the algorithm does better. E.g. removing nodes from
> > consideration when they stop moving under a certain amount each time.
> >
> > Liam
> >
> >
> > --
> > Liam Quin, https://www.delightfulcomputing.com/
> > Available for XML/Document/Information Architecture/XSLT/
> > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
> > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
> >
>=20
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--