After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583209 - Syntax Highlighting for the Standard SPARQL Query Language
Syntax Highlighting for the Standard SPARQL Query Language
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-19 13:11 UTC by James Leigh
Modified: 2009-11-30 19:19 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
SPARQL Syntax for language-spec 1.0 (6.81 KB, application/xml)
2009-05-19 13:13 UTC, James Leigh
Details
SPARQL Syntax for language-spec 2.0 (9.01 KB, application/xml)
2009-05-19 18:20 UTC, James Leigh
Details
SPARQL Syntax for language-spec 2.0 (9.11 KB, application/xml)
2009-05-20 15:33 UTC, James Leigh
Details
SPARQL Syntax for language-spec 2.0 (9.10 KB, application/xml)
2009-05-21 12:31 UTC, James Leigh
Details
SPARQL Syntax for language-spec 2.0 (15.73 KB, application/xml)
2009-11-30 16:41 UTC, James Leigh
Details
SPARQL Syntax for language-spec 2.0 (15.93 KB, application/xml)
2009-11-30 17:37 UTC, James Leigh
Details
Sample SPARQL file (456 bytes, application/sparql-query)
2009-11-30 18:00 UTC, James Leigh
Details

Description James Leigh 2009-05-19 13:11:28 UTC
SPARQL has been a W3C Recommendation since 15 January 2008 and should be included as a highlighting mode along with SQL.

More information about the SPARQL syntax can be found here:
http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/
Comment 1 James Leigh 2009-05-19 13:13:21 UTC
Created attachment 134935 [details]
SPARQL Syntax for language-spec 1.0

Blogged about it here:
http://jamesrdf.blogspot.com/2009/04/in-searching-for-highlighting-mode-for.html
Comment 2 Paolo Borelli 2009-05-19 13:25:47 UTC
this file seems to use the old and outdated 1.0 format. While still supported for backward compatibility, we do not ship any .lang with this format anymore.

The new lang format is more expressive and powerful: see 

http://library.gnome.org/devel/gtksourceview-2.0/stable/lang-tutorial.html
http://library.gnome.org/devel/gtksourceview-2.0/stable/lang-reference.html

also, please if needed, submit a request for a specific mime type to bugs.freedestop.org
Comment 3 James Leigh 2009-05-19 18:20:47 UTC
Created attachment 134964 [details]
SPARQL Syntax for language-spec 2.0

Converted spec file to version 2.0
Comment 4 James Leigh 2009-05-20 15:33:04 UTC
Created attachment 135034 [details]
SPARQL Syntax for language-spec 2.0

Updated the IRI regex expression.
Comment 5 James Leigh 2009-05-21 12:31:50 UTC
Created attachment 135092 [details]
SPARQL Syntax for language-spec 2.0

Fix the backslashes in the IRI regex
Comment 6 Ignacio Casal Quinteiro (nacho) 2009-11-26 23:43:12 UTC
the file looks good to me except for one minor thing, would be great if you could organize the file in a different way:
http://git.gnome.org/cgit/gtksourceview/tree/gtksourceview/language-specs/csharp.lang

there are several context and then the lang context that includes the other ones. In this way it is easier to check if something is wrong in the future.
Comment 7 James Leigh 2009-11-30 16:41:47 UTC
Created attachment 148761 [details]
SPARQL Syntax for language-spec 2.0

Change the layout, updated syntax to a SPARQL 1.1 Draft, and added more standard vocabularies.

Note that the mimetype is application/sparql-query and the file extension is *.rq
http://www.w3.org/TR/rdf-sparql-query/#mediaType
Comment 8 Ignacio Casal Quinteiro (nacho) 2009-11-30 16:45:17 UTC
Also if it is possible would be great if you could attach a test file no more than 10 lines so we can include it in our test script.
Comment 9 Ignacio Casal Quinteiro (nacho) 2009-11-30 16:56:11 UTC
About the file I've just had a quick look and it is really good but I'd like to see some minor changes:
- Please Add one empty line between contexts
- <style id="namespace" _name="namespace" map-to="def:builtin"/> <- I'd put the first char in capital letter
- and about the regexes I'd put them in several lines so they aren't so long and they are easier to look at.

Thanks a lot for the file.
Comment 10 James Leigh 2009-11-30 17:37:29 UTC
Created attachment 148762 [details]
SPARQL Syntax for language-spec 2.0

Wrap regex on multiple lines, change _name attributes to initcap, and add a blank lines around <definiations>
Comment 11 James Leigh 2009-11-30 18:00:24 UTC
Created attachment 148763 [details]
Sample SPARQL file
Comment 12 Ignacio Casal Quinteiro (nacho) 2009-11-30 19:19:10 UTC
Thank you for it, I've just pushed the language file.