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

Van: topbraid-users@googlegroups.com [mailto:topbraid-users@googlegroups.com] 
Namens David Price
Verzonden: donderdag 7 april 2022 23:21
Aan: topbraid-users@googlegroups.com
Onderwerp: Re: [topbraid-users] RDF/XML output differs between sparqlmotion and 
tbl/sparql

Perhaps you could use Jena command line tool to copy to your preferred 
encoding. I think the tool is called riot.

I think NT would export fastest and then you could re-encode as rdfxml. Not 
great with huge files but might be ok otherwise.
Cheers,
David


On 7 Apr 2022, at 20:01, 'Richard Nagelmaeker' via TopBraid Suite Users 
<topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote:
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.
http://localhost:8099/tbl/service/historie/!/exportToRDF/rdfxml
Though it only returns the requested graph. Is there a way to get all imports 
included (graphWithImports) using this service method?

Thank you and regards,

Richard
On Monday, April 4, 2022 at 4:29:18 PM UTC+2 Richard Nagelmaeker wrote:
Hi Holger,

Thank you for the extensive response.

I'll go with your ADS suggestion:

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/sparqlmotionfunctions#convertRDFToText>(<http://topbraid.org/sparqlmotionlib#RDFXML><http://topbraid.org/sparqlmotionlib#RDFXML>)
 AS ?s)
btw. I'm well aware of the RDF/XML position in the Linked Data community. But 
from a short- and long term cost perspective it's probably still the best there 
is. About turtle, my recent opinion is, that it's actually too good. It's so 
easy to read, people accept it as an end result. While it's actually a data 
format and as is true for all data formats, it's meant to transfer data between 
machines.

If you look at it from that perspective, I think the toolset for turtle is 
limited and turtle itself is not extensible.

This is why I prefer XML over Turtle.

Kind regards.

Richard
On Wednesday, March 30, 2022 at 1:20:13 AM UTC+2 Holger Knublauch wrote:

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/sparqlmotionfunctions#convertRDFToText>(<http://topbraid.org/sparqlmotionlib#RDFXML><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


On 2022-03-30 2:24 am, 'Richard Nagelmaeker' via TopBraid Suite Users wrote:
Hi all,

In EDG 6.4 we used sparqlmotion to retrieve RDF/XML and process this using some 
XSLT scripts.

Now we are using EDG 7.1.2 the sparqlmotion option is gone. So we access the 
sparql end-point directly. (tbl/sparql). Using application/rdf+xml in the 
accept header and posting a construct query. The RDF/XML produced has a 
different syntax form the one produced through sparqlmotion.

I used the Sparql end-point on EDG 6.4.3 as well, this gave the same result als 
EDG 7.1.2. So my assumption is that the difference stems from settings for 
sparqlmotion.

The RDF/XML from sparqlmotion has every subject wrapped in a rdf:Description
The RDF/XML from tbl/sparql has no rdf:Description and has every subject 
wrapped by it's type, also every subject now has nested subjects as well.

Is there a way to get the RDF/XML output from Sparqlmotion, with every subject 
wrapped in a rdf:Description?

Regards,

Richard
--
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<mailto: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<https://groups.google.com/d/msgid/topbraid-users/7e1c4f84-e03f-448c-bfb9-9bf9274cbf28n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/af113da7-47e0-4aa9-ad58-e7fd870996f5n%40googlegroups.com<https://groups.google.com/d/msgid/topbraid-users/af113da7-47e0-4aa9-ad58-e7fd870996f5n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@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<https://groups.google.com/d/msgid/topbraid-users/7FB2151A-86F3-4E4E-981D-0E49CE423988%40topquadrant.com?utm_medium=email&utm_source=footer>.
------------------------- Disclaimer ----------------------------
De informatie verzonden met dit e-mailbericht (en bijlagen) is uitsluitend 
bestemd voor de geadresseerde(n) en zij die van de geadresseerde(n) toestemming 
kregen dit bericht te lezen.
Kennisneming door anderen is niet toegestaan.
De informatie in dit e-mailbericht (en bijlagen) kan vertrouwelijk van aard 
zijn en binnen het bereik van een geheimhoudingsplicht en/of een 
verschoningsrecht vallen.
Indien dit e-mailbericht niet voor u bestemd is, wordt u verzocht de afzender 
daarover onmiddellijk te informeren en het e-mailbericht (en bijlagen) te 
vernietigen.
Conform het beveiligingsbeleid van de Politie wordt e-mail van en naar de 
politie gecontroleerd op virussen, spam en phishing en moet deze e-mail voldoen 
aan de voor de overheid verplichte mailbeveiligingsstandaarden die zijn 
vastgesteld door het Forum Standaardisatie.
Mail die niet voldoet aan het beveiligingsbeleid kan worden geblokkeerd 
waardoor deze de geadresseerde niet bereikt. De geadresseerde wordt hiervan 
niet in kennis gesteld.
---------------------------------------------------------------------
The information sent in this E-mail message (including any attachments) is 
exclusively intended for the individual(s) to whom it is addressed and for the 
individual(s) who has/have had permission from the recipient(s) to read this 
message.
Access by others is not permitted.
The information in this E-mail message (including any attachments) may be of a 
confidential nature and may form part of the duty of confidentiality and/or the 
right of non-disclosure.
If you have received this E-mail message in error, please notify the sender 
without delay and delete the E-mail message (including any attachments).
In conformity with the security policy of the Police, E-mails from and to the 
Police are checked for viruses, spam and phishing and this E-mail must meet the 
standards of the government-imposed E-mail security as set by the 
Standardization Forum.
Any E-mail failing to meet said security policy may be blocked as a result of 
which it will not reach the intended recipient. The recipient concerned will 
not be notified.
---------------------------------------------------------------------

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/14e867db2b614e5594b9839e638f89d5%40politie.nl.
  • [topbraid-users] ... 'Richard Nagelmaeker' via TopBraid Suite Users
    • Re: [topbrai... Holger Knublauch
      • Re: [top... 'Richard Nagelmaeker' via TopBraid Suite Users
        • Re: ... 'Richard Nagelmaeker' via TopBraid Suite Users
          • ... David Price
            • ... 'Nagelmaeker, Richard (R.R.M.)' via TopBraid Suite Users
          • ... Holger Knublauch
            • ... 'Nagelmaeker, Richard (R.R.M.)' via TopBraid Suite Users

Reply via email to