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

sparql-results+xml : (RDF 1.1) wrongly output includes datatypes for rdf:langString and xsd:string.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Jena 3.0.0
    • Fix Version/s: Jena 3.0.1
    • Component/s: ARQ
    • Labels:
      None

      Description

      Data:

      :s1 :p "langtag"@en .
      :s2 :p "simple string" .
      :s3 :p "datatype string"^^xsd:string .
      :s4 :p "not a string"^^xsd:anything .
      

      Output RDF.1.1 :

        <literal datatype="http://www.w3.org/2001/XMLSchema#anything">not a string</literal>
        <literal>datatype string</literal>
        <literal>simple string</literal>
        <literal xml:lang="en">langtag</literal>
      

      using the RDF 1.1 guidance that rdf:langString should not be in output and plain literals are preferred to explicit xsd:string.

      Incorrect output Jena 3.0.0:

        <literal datatype="http://www.w3.org/2001/XMLSchema#string">simple string</literal>
        <literal xml:lang="en" datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString">langtag</literal>
        <literal datatype="http://www.w3.org/2001/XMLSchema#anything">not a string</literal>
        <literal datatype="http://www.w3.org/2001/XMLSchema#string">datatype string</literal>
      

      Output Jena 2.13.0 (RDF 1.0):

        <literal>simple string</literal>
        <literal xml:lang="en">langtag</literal>
        <literal datatype="http://www.w3.org/2001/XMLSchema#anything">not a string</literal>
        <literal datatype="http://www.w3.org/2001/XMLSchema#string">datatype string</literal>
      

        Attachments

          Activity

            People

            • Assignee:
              andy Andy Seaborne
              Reporter:
              andy Andy Seaborne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: