On Sun, 2020-03-08 at 12:06 +0530, Diptendu Dutta wrote: > I have used Jena to generate RDF/XML of the model: > > <rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> > <rdf:Description> > <rdf:subject rdf:parseType="Resource"> > <rdfs:label>TheConsignor</rdfs:label> > </rdf:subject> > <rdf:predicate rdf:resource="http://www.lke.com/lke.owl#shall%20deliver > "/> > <rdf:object rdf:parseType="Resource"> > <rdfs:label>theConsignedUnits</rdfs:label> > </rdf:object> > </rdf:Description> > <rdf:Description> > <rdf:subject rdf:parseType="Resource"> > <rdfs:label>rulesofinterpretation</rdfs:label> > </rdf:subject> > <rdf:predicate rdf:resource="http://www.lke.com/lke.owl#apply%20in"/> > <rdf:object rdf:parseType="Resource"> > <rdfs:label>thisConsignmentAgreement</rdfs:label> > </rdf:object> > </rdf:Description> > . > . > </rdf:RDF> > > Do I need to use some other format apart from RDF/XML so that > the output my be be visualised in a browser? > > I looked at "cytoscape.js", Owl2Vowl, and some others. They all require > the data to be in some specific format. > > Are there libraries available for transforming the RDF/XML to a format > suitable for display in browser? > > Which approach would you suggest?
I have not worked in this area since 2015, but it remains the biggest problem (and opportunity) in semantic technology. Must you work with RDF/XML format? Jena provides many other options, including csv, json-ld, and sparql results format (srx). These are all easier to transform for presentation than RDF/XML. Will you be transforming the RDF on the server or in the browser? Next, do you want to create a static information display, or dynamic display that responds to user input? Do you want a primarily text-based layout (paragraphs, lists, tables), or graphical (boxes or bubbles and lines)? The approach I found most promising was to use d3.js [1] in the browser. This allows you to create either text or graphical layouts, static or dynamic. You can make ajax sparql queries, either CONSTRUCT or SELECT, and transform the results to HTML5 (including SVG and canvas). What is lacking, however, is a standard way to select and transform significant graph patterns, analogous to XSLT templates. Perhaps the graph shape languages, SHACL and ShEx, could be of some help in this area, but I have not kept up in the last 5 years. One of the big disappointments of semantic technologies is that we haven't gotten far past the "connected bubbles" visualization of RDF graphs. That is easy to do and most unhelpful. It is much harder to create useful schema-specific information presentations from semantic data that meet the real needs of the information consumers. Regards, --Paul [1] https://d3js.org/ > > Regards, > > Diptendu Dutta > > Regards, > > Diptendu Dutta