You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by GitBox <gi...@apache.org> on 2022/08/01 10:32:31 UTC

[GitHub] [jena] WolfgangFahl opened a new issue, #1466: try it! link

WolfgangFahl opened a new issue, #1466:
URL: https://github.com/apache/jena/issues/1466

   ### Version
   
   Apache Jena Fuseki 4.3.1
   
   ### Question
   
   I'd like to use a try it button for queries as it is possible for some other RDF triplestores.
   
   E.g. 
   
   - [try it! (wikidata query service)](https://query.wikidata.org/#%23%20get%20the%20most%20frequently%20used%20properties%20for%0A%23%20Q44%3Abeer%0APREFIX%20rdf%3A%20%3Chttp%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A//www.w3.org/2000/01/rdf-schema%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A//schema.org/%3E%0APREFIX%20wd%3A%20%3Chttp%3A//www.wikidata.org/entity/%3E%0APREFIX%20wdt%3A%20%3Chttp%3A//www.wikidata.org/prop/direct/%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A//wikiba.se/ontology%23%3E%0APREFIX%20xsd%3A%20%20%3Chttp%3A//www.w3.org/2001/XMLSchema%23%3E%0ASELECT%20%3Fprop%20%3FpropLabel%20%3Fcount%20WHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fprop%20%28COUNT%28DISTINCT%20%3Fitem%29%20AS%20%3Fcount%29%20WHERE%20%7B%0A%20%20%20%20%20%20hint%3AQuery%20hint%3Aoptimizer%20%22None%22.%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP31%20wd%3AQ44%3B%3Fp%20%3Fid.%0A%20%20%20%20%20%20%3Fprop%20wikibase%3AdirectClaim%20%3Fp.%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%2
 0BY%20%3Fprop%20%3FpropLabel%0A%20%20%7D%0A%20%20%3Fprop%20rdfs%3Alabel%20%3FpropLabel.%0A%20%20FILTER%28LANG%28%3FpropLabel%29%20%3D%20%22en%22%29%20%20%20%20%20%20%0A%7D%0AORDER%20BY%20DESC%20%28%3Fcount%29%0A)
   - [try it! (Virtuoso public wikidata endpoint)](https://wikidata.demo.openlinksw.com/sparql?query=%23%20get%20the%20most%20frequently%20used%20properties%20for%0A%23%20Q44%3Abeer%0APREFIX%20rdf%3A%20%3Chttp%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A//www.w3.org/2000/01/rdf-schema%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A//schema.org/%3E%0APREFIX%20wd%3A%20%3Chttp%3A//www.wikidata.org/entity/%3E%0APREFIX%20wdt%3A%20%3Chttp%3A//www.wikidata.org/prop/direct/%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A//wikiba.se/ontology%23%3E%0APREFIX%20xsd%3A%20%20%3Chttp%3A//www.w3.org/2001/XMLSchema%23%3E%0ASELECT%20%3Fprop%20%3FpropLabel%20%3Fcount%20WHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fprop%20%28COUNT%28DISTINCT%20%3Fitem%29%20AS%20%3Fcount%29%20WHERE%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP31%20wd%3AQ44%3B%3Fp%20%3Fid.%0A%20%20%20%20%20%20%3Fprop%20wikibase%3AdirectClaim%20%3Fp.%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fprop%20%3FpropLabel%0A%2
 0%20%7D%0A%20%20%3Fprop%20rdfs%3Alabel%20%3FpropLabel.%0A%20%20FILTER%28LANG%28%3FpropLabel%29%20%3D%20%22en%22%29%20%20%20%20%20%20%0A%7D%0AORDER%20BY%20DESC%20%28%3Fcount%29%0A)
   
   - [try it! Qlever wikidata ](https://qlever.cs.uni-freiburg.de/wikidata?query=%23%20get%20the%20most%20frequently%20used%20properties%20for%0A%23%20Q44%3Abeer%0APREFIX%20rdf%3A%20%3Chttp%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A//www.w3.org/2000/01/rdf-schema%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A//schema.org/%3E%0APREFIX%20wd%3A%20%3Chttp%3A//www.wikidata.org/entity/%3E%0APREFIX%20wdt%3A%20%3Chttp%3A//www.wikidata.org/prop/direct/%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A//wikiba.se/ontology%23%3E%0APREFIX%20xsd%3A%20%20%3Chttp%3A//www.w3.org/2001/XMLSchema%23%3E%0ASELECT%20%3Fprop%20%3FpropLabel%20%3Fcount%20WHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fp%20%28COUNT%28DISTINCT%20%3Fitem%29%20AS%20%3Fcount%29%20WHERE%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP31%20wd%3AQ44.%20%20%0A%20%20%20%20%20%20%3Fitem%20ql%3Ahas-predicate%20%3Fp%20%0A%20%20%20%20%7D%20GROUP%20BY%20%3Fp%0A%20%20%7D%0A%20%20%3Fprop%20wikibase%3AdirectClaim%20%3Fp.%0A%20%2
 0%3Fprop%20rdfs%3Alabel%20%3FpropLabel.%0A%20%20FILTER%28LANG%28%3FpropLabel%29%20%3D%20%22en%22%29%20%20%20%20%20%20%0A%7D%0AORDER%20BY%20DESC%20%28%3Fcount%29%0A)
   
   With Fuseki i get an XML result by default. Would it be possible to get an HTML result or end up in the gui instead?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1466: try it! link

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1466:
URL: https://github.com/apache/jena/issues/1466#issuecomment-1202147527

   That's an HTML document - it says two lines further down `<title>404 Not Found</title>`.
   
   `https://confident.dbis.rwth-aachen.de/` is a gateway proxy (Apache httpd) so it will need to route the request to Fuseki and Fuseki will need to have that file in-place or the server have the file itself. 
   
   Example file: https://github.com/apache/jena/blob/main/jena-fuseki2/jena-fuseki-main/sparqler/pages/xml-to-html.xsl (used at sparql.org).
   
   No need to paste 60-70 line query string  - a short query will work for getting setup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] WolfgangFahl commented on issue #1466: try it! link

Posted by GitBox <gi...@apache.org>.
WolfgangFahl commented on issue #1466:
URL: https://github.com/apache/jena/issues/1466#issuecomment-1202078167

   @afs - thanks for the hint - 
   
   I am trying e.g:
   [count of beer instances in wikidata](https://confident.dbis.rwth-aachen.de/jena/wikidata?query=%23%20Count%20all%20items%20with%20the%20given%20type%0A%23%20Q44%3Abeer%0APREFIX%20rdf%3A%20%3Chttp%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A//www.w3.org/2000/01/rdf-schema%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A//schema.org/%3E%0APREFIX%20wd%3A%20%3Chttp%3A//www.wikidata.org/entity/%3E%0APREFIX%20wdt%3A%20%3Chttp%3A//www.wikidata.org/prop/direct/%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A//wikiba.se/ontology%23%3E%0APREFIX%20xsd%3A%20%3Chttp%3A//www.w3.org/2001/XMLSchema%23%3E%0A%0ASELECT%20%28COUNT%20%28DISTINCT%20%3Fitem%29%20AS%20%3Fcount%29%0AWHERE%0A%7B%0A%20%20%23%20instance%20of%20beer%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ44.%0A%7D)
   
   and hoped:
   [beer instance count with styleseheet](https://confident.dbis.rwth-aachen.de/jena/wikidata?output=xml&stylesheet=%2Fxml-to-html.xsl&query=%23 truly tabular aggregate query for %0A%23 Q44%3Abeer%0A%23 generated by trulytabular.py version 0.3.13 on 2022-08-02T08%3A33%3A42.798277%0APREFIX rdf%3A <http%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23>%0APREFIX rdfs%3A <http%3A//www.w3.org/2000/01/rdf-schema%23>%0APREFIX schema%3A <http%3A//schema.org/>%0APREFIX wd%3A <http%3A//www.wikidata.org/entity/>%0APREFIX wdt%3A <http%3A//www.wikidata.org/prop/direct/>%0APREFIX wikibase%3A <http%3A//wikiba.se/ontology%23>%0APREFIX xsd%3A <http%3A//www.w3.org/2001/XMLSchema%23>%0A%0ASELECT %3Fbeer %3FbeerLabel%0A%20 (SAMPLE (%3Finstance_of) AS %3Finstance_of_sample)%0A%20 (GROUP_CONCAT (DISTINCT %3Finstance_of%3BSEPARATOR%3D"|") AS %3Finstance_of_list)%0A%20 (COUNT (DISTINCT %3Finstance_of) AS %3Finstance_of_count)%0A%20 (SAMPLE (%3Fmanufacturer) AS %3Fmanufacturer_sample)%0A%20 (GROUP_CONCAT (DISTINCT
  %3Fmanufacturer%3BSEPARATOR%3D"|") AS %3Fmanufacturer_list)%0A%20 (COUNT (DISTINCT %3Fmanufacturer) AS %3Fmanufacturer_count)%0A%20 (SAMPLE (%3Fimage) AS %3Fimage_sample)%0A%20 (GROUP_CONCAT (DISTINCT %3Fimage%3BSEPARATOR%3D"|") AS %3Fimage_list)%0A%20 (COUNT (DISTINCT %3Fimage) AS %3Fimage_count)%0A%20 (SAMPLE (%3Ffabrication_method) AS %3Ffabrication_method_sample)%0A%20 (GROUP_CONCAT (DISTINCT %3Ffabrication_method%3BSEPARATOR%3D"|") AS %3Ffabrication_method_list)%0A%20 (COUNT (DISTINCT %3Ffabrication_method) AS %3Ffabrication_method_count)%0A%20 (SAMPLE (%3Finception) AS %3Finception_sample)%0A%20 (GROUP_CONCAT (DISTINCT %3Finception%3BSEPARATOR%3D"|") AS %3Finception_list)%0A%20 (COUNT (DISTINCT %3Finception) AS %3Finception_count)%0A%20 (SAMPLE (%3Fcountry) AS %3Fcountry_sample)%0A%20 (GROUP_CONCAT (DISTINCT %3Fcountry%3BSEPARATOR%3D"|") AS %3Fcountry_list)%0A%20 (COUNT (DISTINCT %3Fcountry) AS %3Fcountry_count)%0AWHERE {%0A%20 %23 instanceof Q44%3Abeer%0A%20 %3Fbeer wdt%3AP3
 1 wd%3AQ44.%0A%20 %23 label%0A%20 %3Fbeer rdfs%3Alabel %3FbeerLabel.%20 %0A%20 FILTER (LANG(%3FbeerLabel) %3D "en").%0A%20 %23 instance of (P31)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP31 %3Finstance_of. %0A%20 }%0A%20 %23 manufacturer (P176)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP176 %3Fmanufacturer. %0A%20 }%0A%20 %23 image (P18)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP18 %3Fimage. %0A%20 }%0A%20 %23 fabrication method (P2079)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP2079 %3Ffabrication_method. %0A%20 }%0A%20 %23 inception (P571)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP571 %3Finception. %0A%20 }%0A%20 %23 country (P17)%0A%20 OPTIONAL { %0A%20%20%20 %3Fbeer wdt%3AP17 %3Fcountry. %0A%20 }%0A}%0AGROUP BY%0A%20 %3Fbeer %0A%20 %3FbeerLabel%0A)
   
   would work but i get:
   ```
   XML-Verarbeitungsfehler: Syntax-Fehler
   Adresse: https://confident.dbis.rwth-aachen.de/xml-to-html.xsl
   Zeile Nr. 1, Spalte 50:
   <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
   -------------------------------------------------^
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1466: try it! link

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1466:
URL: https://github.com/apache/jena/issues/1466#issuecomment-1201308499

   To get HTML, use parameters in the URL request: `...&output=xml&stylesheet=%2Fxml-to-html.xsl`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org