Topic on Extension talk:LinkedWiki

Legaulph (talkcontribs)

I'm running some more test and have come up with this issue. I have for a current versions

MediaWiki 1.25.5
Semantic MediaWiki 2.3
Page Forms 4.0.2-alpha
LinkedWiki	2.1.0 alpha 1

Query that works in these versions

{{#sparql:
PREFIX property:<http://server.com/index.php/Special:URIResolver/Property-3A>
PREFIX swivt:<http://semantic-mediawiki.org/swivt/1.0#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?supported_by ?Subcategory ?name ?version ?technology_name ?owner ?contact ?publication_date ?publication_status ?support_status ?manufacturer ?start_date ?end_date
WHERE 
{
 ?s ?p ?sub .
            ?cat rdfs:label ?Category .
            ?cat rdfs:label "Technology" .
            FILTER(CONTAINS(STR(?cat), "Category")) .
            ?sub rdfs:subClassOf ?cat .
            ?sub rdfs:label ?Subcategory .
 ?s property:Has_Name ?name .
  ?s property:Has_subobject ?subobject .
  ?subobject property:Has_Version ?version .
  ?subobject property:Technology_Name ?technology_name .
  ?subobject property:Has_Support_Status ?support_status .
  ?subobject property:Has_Start_Date ?start_date .
   ?subobject property:Has_End_Date ?end_date .
   ?subobject property:Supported_By ?supported_by .
    ?s property:OwnedBy ?owner.
    ?s property:PublicationDate ?publication_date .
    ?s property:PublicationStatus ?publication_status .
    ?s property:ManufacturedBy ?manufacturer.
  OPTIONAL {
    ?s property:Contact ?contact.
  }
}
ORDER BY ?name
LIMIT 1000000
|endpoint=http://server:8080/dev/sparql}}

Does not work in these versions:

MediaWiki 1.28.0
Semantic MediaWiki 2.4.4
Page Forms 4.0.2-alpha
LinkedWiki	3.0.0 Alpha (bec49e4)

} ORDER BY ?name LIMIT 10 Error endpoint: http://server:8080/db1/sparql Error http_response_code: 200 Error message: Error parsing XML result:Not well-formed (invalid token) Response : {

Karima Rafes (talkcontribs)

What is the name and the version of your database ? It's the same version between the two tests ?

Can you execute this command ?

./sparql/query -v -d -r -e http://server:8080/dev/sparql -f yourQuery.rq

I think your database sends a json and not a XML. I need to check if the parameter accept=application/sparql-results+xml is in the HTTP's header. This command can print the header in the log. (I think...)

Thanks Karima

Legaulph (talkcontribs)

Yes the same version and actually the same server Apache Jena Fuseki Version 2.3.0.

Karima Rafes (talkcontribs)

Ok I found the problem. I disabled an old fix for Fuseki. I thought this difference in the protocol was from the past but the problem of content negotiation is always present.

Sorry. Now, you can download the last version in the master.

Karima

148.177.1.212 (talkcontribs)

Thank you

Legaulph (talkcontribs)

Hi Karima, Maybe I'm doing something wrong Still getting the error:

Error http_response_code: 200 Error message: Error parsing XML result:Not well-formed (invalid token) Response :

Query is a simple one

{{#sparql:
PREFIX property:<http://server.com/index.php/Special:URIResolver/Property-3A>
PREFIX swivt:<http://semantic-mediawiki.org/swivt/1.0#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?name 
WHERE 
{
?s property:Has_Name ?name .

}
LIMIT 15
|endpoint=http://server.com:8080/ds/sparql}}
}}

I have added to the extension.json

        "http://server.com": {
        "endpoint": "http://server.com:8080/ds/sparql",
        "typeRDFDatabase": "fuseki",
        "HTTPMethodForQuery": "GET"
      },
Karima Rafes (talkcontribs)

Have you update the extension ? You can check if you have the last version in the file : endpoint.php See the last update in the file endpoint

If you want to do a query with your configuration in the file extension.json, you can write :

{{#sparql:
select * where 
 { ?x ?y ?z . } 
LIMIT 15
|config=http://server.com
}}

(the special page : SPARQL editor helps to test your configuration)

Bye

Legaulph (talkcontribs)

I had to remove

"typeRDFDatabase": "fuseki",

Thanks