RDF.XSD.Datatype.init_valid_lexical
init_valid_lexical
, go back to RDF.XSD.Datatype module for more information.
Specs
init_valid_lexical(any(), uncanonical_lexical(), Keyword.t()) :: uncanonical_lexical()
Produces the lexical representation to be used for a RDF.XSD.Datatype
literal.
By default the lexical representation of a RDF.XSD.Datatype
is either the
canonical form in case it is created from a non-string Elixir value or, if it
is created from a string, just with that string as the lexical form.
But there can be various reasons for why this should be different for certain
datatypes. For example, for RDF.XSD.Double
s given as Elixir floats, we want the
default lexical representation to be the decimal and not the canonical
exponential form. Another reason might be that additional options are given
which should be taken into account in the lexical form.
If the lexical representation for a given value
and lexical
should be the
canonical one, an implementation should return nil
.