Uploaded image for project: 'Marmotta (Retired)'
  1. Marmotta (Retired)
  2. MARMOTTA-270

RDFPath grammar for URI is too restrictive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0-incubating
    • None
    • LDPath
    • None

    Description

      The RDFPath grammar in LDPath is too restrictive, and only validates URIs containing "://":

      URI: ["a"-"z","A"-"Z"](["a"-"z","A"-"Z","0"-"9","+","-","."])* "://" (["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"])+ ("#" (["a""z","A""Z","0""9",";","/","?",":","@","&","=","","$",".","","_","!","~","","'","%"]))? | "#" (["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"])> |

      https://github.com/apache/incubator-marmotta/blob/master/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj#L390

      So, a program like:

      @prefix fedora : <http://fedora.info/fedora-system:def/internal#> ;

      is valid, but a program containing:

      @prefix fedora : <info:fedora/fedora-system:def/internal#> ;

      fails with the exception:

      Caused by: org.apache.marmotta.ldpath.parser.ParseException: Encountered " "@prefix" "@prefix "" at line 1, column 1. Was expecting: <EOF>

      Attachments

        Activity

          People

            wastl Sebastian Schaffert
            cbeer Chris Beer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: