1

I see that multiline comments are not supported by the SPARQL specification. Is there some near standard way that existing SPARQL libraries allow multiline comments?

If the SPARQL library you use does support multiline comments please mention the parser with a link and provide an example of a multiline comment within a SPARQL query.

flag

1 Answer

2

As far as I know there are no libraries that support this - a comment is explicitly defined as follows in the specification section on comments:

Comments in SPARQL queries take the form of '#', outside an IRI or string, and continue to the end of line (marked by characters 0x0D or 0x0A) or end of file if there is no end of line after the comment marker. Comments are treated as white space.

If you want to split a comment over multiple lines then you need to start each line with a #

Out of interest is there a particular reason you need/want multi-line comments?

link|flag
1 
I know that is what the specification says. But almost every language including structured query languages like SQL support some sort of multiline comment. If I have a large portion of a query I want to comment out while debugging it is very tedious and typo prone to have to put a # in front of every line. It seems like you are asking why I would want SPARQL to have feature parity with almost every other language. :) – spoon16 Mar 15 at 16:55
Ha - very good point +1 Your best bet if you want this feature is to post to the SPARQL working group comments mailing lists - public-rdf-dawg-comments@w3.org and see if you can convince them to put it into the 1.1 spec – Rob Vesse Mar 16 at 9:04

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.