Hi Richard,
the Jena API that we use under the hood has two dialects of RDF/XML syntax. One is called "RDF/XML Abbrev" and uses a less predictable, but more readable format, while the plain RDF/XML uses rdf:Descriptions that are more regular and thus attractive for XSLT. As you have found out, the SPARQLMotion servlet was only supporting the plain RDF/XML syntax.
Side note: The variations of syntax have been a major reason why RDF/XML has long become very unpopular for many users. In the early days RDF/XML was the only syntax for RDF and this backfired to the RDF data model as a general graph data representation mechanism. Many people have therefore moved to Turtle syntax.
One strategy to solve whatever you have to solve is to move the processing into the TopBraid server itself. For example, instead of having an external XSL processor work on the results of the SM calls, you could write a JavaScript or SWP script that operates on the graph itself, regardless of the syntax, and then produces exactly the output that you really want. Many TopBraid users seem to be quite content with JavaScript/ADS, see https://www.topquadrant.com/doc/7.2/scripting/index.html but if your XSLT is producing HTML you may also use SWP directly.
If you need to continue to use external XSLT, the SPARQL endpoint itself is NOT an option either, because if you run a CONSTRUCT there it can only produce abbreviated RDF/XML. However, you could use this SPARQL function
BIND (<http://topbraid.org/sparqlmotionfunctions#convertRDFToText>(<http://topbraid.org/sparqlmotionlib#RDFXML>) AS ?s)
to produce an RDF/XML string, which you could then return either
from an SWP script or an ADS/JavaScript service. In SWP it would
mean to first collect all relevant triples into ui:tempGraph using
ui:update, and then do
<ui:setContext ui:queryGraph="{= ui:tempGraph }">
<ui:return ui:result="{= smf:convertRDFToText(sml:RDFXML)
}" />
</ui:setContext>
I am not sure what other technical background you have and whether these pointers are enough, so feel free to follow-up.
Holger
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/7e1c4f84-e03f-448c-bfb9-9bf9274cbf28n%40googlegroups.com.
If you need to continue to use external XSLT, the SPARQL endpoint itself is NOT an option either, because if you run a CONSTRUCT there it can only produce abbreviated RDF/XML. However, you could use this SPARQL function
BIND (<http://topbraid.org/sparqlmotionfunctions#convertRDFToText>(<http://topbraid.org/sparqlmotionlib#RDFXML>) AS ?s)
On 7 Apr 2022, at 20:01, 'Richard Nagelmaeker' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
Hi,
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/af113da7-47e0-4aa9-ad58-e7fd870996f5n%40googlegroups.com.
Hi,
I'm still looking for a fitting solution. One is to use the SPARQL RESULT XML, as the output for a CONSTRUCT query. And transform it to RDF/XML. An other one is to use tbl/service:Below an example URL: Where 'historie' is the name of a graph.Though it only returns the requested graph. Is there a way to get all imports included (graphWithImports) using this service method?
No, this service would only return the base graphs, not the imports closure.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/af113da7-47e0-4aa9-ad58-e7fd870996f5n%40googlegroups.com.
Hi David,
Thank you for the suggestion. I didn’t know that Jena commandline tools, would work with EDG. I’ll look into it. But for now we have an HTTP based flow. So doing things using the command line, introduces another set of issues.
Cheers,
Richard
--
You received this message because you are subscribed to a topic in the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/topbraid-users/7prOsvlc4-E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
topbraid-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/7FB2151A-86F3-4E4E-981D-0E49CE423988%40topquadrant.com.
Thank you for your clear answer, Holger.
Regards,
Richard
Van: topbrai...@googlegroups.com [mailto:topbrai...@googlegroups.com]
Namens Holger Knublauch
Verzonden: vrijdag 8 april 2022 00:51
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] RDF/XML output differs between sparqlmotion and tbl/sparql
On 2022-04-08 5:01 am, 'Richard Nagelmaeker' via TopBraid Suite Users wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/topbraid-users/7prOsvlc4-E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
topbraid-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/7a9badbe-88ba-f406-55a1-236a975c236c%40topquadrant.com.