Friday, March 29, 2024

save SVG (and HTML) as RDF graph

SVG is DOM, meaning it has a hierarchy of nodes, same as HTML, just as different XML variant.
Any any hierarchy is a "graph", and RDF designed for representing graphs.
So, technically SVG could be a "semantic web" visual graph.
Why? Just because it could be done, I guess :)

Old Dog, New Tricks by Kurt Cagle @ LinkedIn
Expressing SVG (and HTML) as RDF

There are many good use-cases for RDF variants, while SVG may not be one of them... 
Visual graphs, expressed in higher-level model, that would be a very good use-case for RDF.

Resource Description Framework - Wikipedia

But RDF itself is already obscure enough, unless used in simplified serialization such as N3.

We may need to use AI to come up with a simpler to use graph representation syntax...


API specs: Swagger/OpenAPI, WADL, RAML

Microsoft Azure AI APIs have specs in Swagger (JSON), WADL (XML) and "English" format.
Cognitive Services APIs Reference

Another approach is to use WADL, which can be generated by some tools. In this case, it’s machine-readable, but definitely not human-readable. Also, writing a WADL manually is a tedious process.






RESTful API Modeling Language (RAML) is a YAML-based language for describing static APIs (but not REST APIs).





Revisiting the features offered in WADL, RAML, and Swagger - RESTful Java Web Services - Second Edition [Book]

Features

WADL

RAML

Swagger

Release date

2009

2013

2011

File format

XML

RAML

JSON/YAML

Open source

Yes

Yes

Yes

Commercial offering

No

Yes

Yes

Language support

Java

JS, Java, Node, PHP, Python, and Ruby

Clojure, Go, JS, Java, .Net, Node, PHP, Python, Ruby, and Scala

Authentication

No

Basic, Digest, OAuth 1, and OAuth 2

Basic, API Key, and OAuth 2

API console

No

Yes

Yes

Code generation for server (Java)

No

Yes

Yes

Code generation for client (Java)

Yes

Yes

Yes

Apache ECharts: JavaScript Visualization

Apache ECharts
An Open Source JavaScript Visualization Library