Hi Steve, sml:ApplyConstruct has a hack where it interprets the FROM clause in a non-standard way: It interprets the first FROM clause as a SPARQL endpoint URL, and sends the query for execution to that remote endpoint. In your case, the URI in the FROM clause of course isn’t a SPARQL endpoint, so it doesn’t respond in the expected way, and hence the error.
This means you can’t use FROM for its intended purpose with sml:ApplyConstruct. You could try using two “Import RDF from workspace” to load the two graphs from their base URIs, and connect them both as inputs to sml:ApplyConstruct. Hope that helps, Richard > On 12 Sep 2018, at 19:00, Steve Ray (CMU) <[email protected]> wrote: > > Hi, > I have a working SPARQLMotion script that contains an > sml:ApplyConstruct module with the following SPARQL query: > > CONSTRUCT { > ?s ?p ?o . > } > WHERE { > GRAPH <http://siemens.com/vocab/kps/epic_instances > <http://siemens.com/vocab/kps/epic_instances>> { > BIND (spif:buildURI(?tag) AS ?tagURI) . > ?s <http://siemens.com/schemas/kps/epic#hasTag > <http://siemens.com/schemas/kps/epic#hasTag>> ?tagURI . > ?s ?p ?o . > } . > } > > (?tag is passed in as a variable). > I want to expand the search to two graphs, so I changed the query to: > > CONSTRUCT { > ?s ?p ?o . > } > FROM <http://siemens.com/vocab/kps/epicArchive > <http://siemens.com/vocab/kps/epicArchive>> > FROM <http://siemens.com/vocab/kps/epic_instances > <http://siemens.com/vocab/kps/epic_instances>> > WHERE { > BIND (spif:buildURI(?tag) AS ?tagURI) . > ?s <http://siemens.com/schemas/kps/epic#hasTag > <http://siemens.com/schemas/kps/epic#hasTag>> ?tagURI . > ?s ?p ?o . > } > > …but this gives the following error: > > HTTP ERROR: 500 > Problem accessing /tbl/sparqlmotion. Reason: > An internal error has been reported by the SPARQLMotion engine of > TopBraid Live. > > Summary: [Endpoint returned Content Type: text/html which is not a valid RDF > syntax] > > Details: org.apache.jena.query.QueryException: Endpoint returned Content > Type: text/html which is not a valid RDF syntax > at > org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConstructWorker(QueryEngineHTTP.java:491) > at > org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel(QueryEngineHTTP.java:440) > ... more > > > The odd thing is that the same query works inside a SPARQL query pane in TBC > Maestro. > > Any ideas? > > > - Steve > > Steven R. Ray, Ph.D. > Distinguished Research Fellow > Carnegie Mellon University > NASA Research Park > Building 23 (MS 23-11) > P.O. Box 1 > Moffett Field, CA 94305-0001 > Email: [email protected] <mailto:[email protected]> > Phone: (650) 587-3780 > Cell: (202) 316-6481 > Skype: steverayconsulting > <image001.png> > > > -- > 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 [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
