• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

3.1.3 RDF literals
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Two RDF APIs
          • library(semweb/rdf11): The RDF database
            • RDF literals
              • rdf_canonical_literal/2
              • rdf_lexical_form/2
              • rdf_compare/3
Availability::- use_module(library(semweb/rdf11)).
Source[det]rdf_compare(-Diff, +Left, +Right)
True if the RDF terms Left and Right are ordered according to the comparison operator Diff. The ordering is defines as:

  • Literal < BNode < IRI
  • For literals

    • Numeric < non-numeric
    • Numeric literals are ordered by value. If both are equal, floats are ordered before integers.
    • Other data types are ordered lexicographically.

  • BNodes and IRIs are ordered lexicographically.

Note that this ordering is a complete ordering of RDF terms that is consistent with the partial ordering defined by SPARQL.

Diff is one of <, = or >
ClioPatria (version V3.1.1-51-ga0b30a5)