Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-542

Command line queries are always parsed in extended mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • Jena 2.10.1
    • Jena 2.11.1
    • Cmd line tools
    • None

    Description

      As discovered in a jena-users thread [1], the command line SPARQL query tools (arq and sparql) always process a query specified on the command line in extended mode, regardless of the value of --strict. E.g.,

      sparql --strict --data empty.n3 "select * where { ?s <p>

      {2}

      ?o }"

      doesn't complain, even though the elt

      {n} syntax didn't make it into SPARQL 1.1. If the query is put into a file, though, the following behavior holds:

      Complains:
      sparql --data empty.n3 --file Q.rq # extension .rq

      Does not.
      arq --data empty.n3 --file Q.rq
      arq --data empty.n3 --file Q.arq
      sparql --data empty.n3 --file Q.arq # extension .arq

      Relate to this (possibly should be a separate ticket), it's not clear how the extension of the file interacts with the --strict flag, or what exactly the --strict flag is supposed to do. According to Andy (in the linked thread),

      """
      "arq" implies the extended language and "--strict" really refers to execution semantics. "arq --strict" could be made to be (strict) SPARQL 1.1.
      """

      however, the documentation (sparql --help) says

      --strict Operate in strict SPARQL mode (no extensions of any kind)

      and it seems elt{n}

      , since elt

      {n}

      didn't make it into the specs, must be an extension of some kind.

      [1] http://mail-archives.apache.org/mod_mbox/jena-users/201309.mbox/%3CCA%2BQ4JnnROnG_5LW-aEtOWPt0C_PYNjYTOj4x-SmUAhshCN2buQ%40mail.gmail.com%3E

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              taylorj Joshua Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: