5.1 Literal Type
struct
lexical-form : string? datatype-iri : url-absolute? language-tag : language-tag?
This structure combines the three values lexical-form, datatype-iri, and language-tag.
constructor
(make-untyped-literal form) → literal?
form : string?
Returns a new literal as an untyped, non-language-tagged string.
Example:
> (make-untyped-literal "22") (literal "22" #f #f)
constructor
(make-typed-literal form datatype-iri) → literal?
form : string? datatype-iri : url-absolute?
Returns a new literal as a typed, non-language-tagged string.
Example:
> (make-typed-literal "22" (string->url "http://www.w3.org/2001/XMLSchema#byte"))
(literal
"22"
(url
"http"
#f
"www.w3.org"
#f
#t
(list (path/param "2001" '()) (path/param "XMLSchema" '()))
'()
"byte")
#f)
constructor
(make-lang-string-literal form language) → literal?
form : string? language : language-tag?
Returns a new literal as an untyped, language-tagged string.
Example:
> (make-lang-string-literal "22" "en")
(literal
"22"
(url
"http"
#f
"www.w3.org"
#f
#t
(list
(path/param "1999" '())
(path/param "02" '())
(path/param "22-rdf-syntax-ns" '()))
'()
"langString")
"en")