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/02 06:37:54 UTC

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

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