summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Alfredo Garciliano Díaz <rapunzel@disroot.org>2022-02-16 07:34:31 +0000
committerDavid Faure <faure@kde.org>2022-02-16 07:34:31 +0000
commit46c2abe8fce53f979bcf1dd4724012aba1a05f89 (patch)
tree468b5c3b1a612fb58464669254f525ff10ce6d54
parent9991f4586f8f8f65c61795939ac870e62f7abebe (diff)
downloadshared-mime-info-46c2abe8fce53f979bcf1dd4724012aba1a05f89.tar.gz
Adding SPARQL media types
-rw-r--r--data/freedesktop.org.xml.in17
-rw-r--r--tests/mime-detection/list4
-rw-r--r--tests/mime-detection/test.qs6
-rw-r--r--tests/mime-detection/test.srx33
4 files changed, 60 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 57cbb3e5..49fb604c 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -7925,4 +7925,21 @@ command to generate the output files.
<match type="string" value="\x5a\x49\x4d\x04" offset="0"/>
</magic>
</mime-type>
+ <mime-type type="application/sparql-query">
+ <comment>SPARQL query</comment>
+ <acronym>SPARQL</acronym>
+ <expanded-acronym>SPARQL Protocol and RDF Query Language</expanded-acronym>
+ <glob pattern="*.qs"/>
+ <magic priority="40">
+ <match type="string" value="PREFIX" offset="0"/>
+ </magic>
+ </mime-type>
+ <mime-type type="application/sparql-results+xml">
+ <comment>SPARQL query results</comment>
+ <acronym>SPARQL</acronym>
+ <expanded-acronym>SPARQL Protocol and RDF Query Language</expanded-acronym>
+ <sub-class-of type="application/xml"/>
+ <root-XML namespaceURI="http://www.w3.org/2005/sparql-results#" localName="sparql"/>
+ <glob pattern="*.srx"/>
+ </mime-type>
</mime-info>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 52c8c3f6..74257889 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -897,3 +897,7 @@ test.avifs image/avif
test.org text/org ox
# OpenZIM file
test.zim application/x-openzim
+# SPARQL query
+test.qs application/sparql-query
+# SPARQL query results
+test.srx application/sparql-results+xml ox
diff --git a/tests/mime-detection/test.qs b/tests/mime-detection/test.qs
new file mode 100644
index 00000000..3ce9d2c6
--- /dev/null
+++ b/tests/mime-detection/test.qs
@@ -0,0 +1,6 @@
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+SELECT ?name (COUNT(?friend) AS ?count)
+WHERE {
+ ?person foaf:name ?name .
+ ?person foaf:knows ?friend .
+} GROUP BY ?person ?name \ No newline at end of file
diff --git a/tests/mime-detection/test.srx b/tests/mime-detection/test.srx
new file mode 100644
index 00000000..3e998378
--- /dev/null
+++ b/tests/mime-detection/test.srx
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<sparql xmlns="http://www.w3.org/2005/sparql-results#">
+ <head>
+ <variable name="name"/>
+ <variable name="count"/>
+ </head>
+ <results>
+ <result>
+ <binding name="name">
+ <literal>Alice</literal>
+ </binding>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">3</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="name">
+ <literal>Bob</literal>
+ </binding>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="name">
+ <literal>Charlie</literal>
+ </binding>
+ <binding name="count">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ </results>
+</sparql> \ No newline at end of file