3 Predicates for parsing RDF/XML
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog RDF parser
        • Predicates for parsing RDF/XML
          • load_rdf/2
          • load_rdf/3
          • RDF Object representation
          • Name spaces
          • Low-level access

3.1 RDF Object representation

The Object (3rd) part of a triple can have several different types. If the object is a resource it is returned as either a plain atom or a term NameSpace:Name. If it is a literal it is returned as literal(Value), where Value takes one of the formats defined below.

  • An atom
    If the literal Value is a plain atom is a literal value not subject to a datatype or xml:lang qualifier.

  • lang(LanguageID, Atom)
    If the literal is subject to an xml:lang qualifier LanguageID specifies the language and Atom the actual text.

  • A list
    If the literal is an XML literal as created by parseType="Literal" , the raw output of the XML parser for the content of the element is returned. This content is a list of element(Name, Attributes, Content) and atoms for CDATA parts as described with the SWI-Prolog SGML/XML parser.

  • type(Type, StringValue)
    If the literal has an rdf:datatype=Type a term of this format is returned.