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

Query::cloneQuery produces invalid syntax

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Jena 3.16.0
    • Jena 3.16.0
    • ARQ
    • None

    Description

      QueryFactory.create("PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#> ASK { SELECT * { ?class a rdfs:Class . } }").cloneQuery().toString()
      

      produces

      PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      ASK
      WHERE
        { PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
          
          SELECT  *
          WHERE
            { ?class  a  rdfs:Class }
        }
      

      which is invalid SPARQL syntax (note the second PREFIX).

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              graphity Martynas Jusevičius
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m