View Source RDF.XSD.Facets.FractionDigits behaviour (RDF.ex v2.0.1)

RDF.XSD.Facet for fractionDigits.

fractionDigits places an upper limit on the arithmetic precision of decimal values: if the {value} of fractionDigits = f, then the value space is restricted to values equal to i / 10n for some integers i and n and 0 ≤ n ≤ f. The value of fractionDigits must be a nonNegativeInteger.

see https://www.w3.org/TR/xmlschema11-2/datatypes.html#rf-fractionDigits

Summary

Callbacks

Returns the value of this RDF.XSD.Facet on specific RDF.XSD.Datatype.

Validates if a value and lexical conforms with a concrete facet_constraint_value for this RDF.XSD.Facet.

Functions

Checks if a value and lexical conforms with the fraction_digits_conform?/3 implementation on the datatype RDF.XSD.Datatype.

Callbacks

@callback fraction_digits() :: non_neg_integer() | nil

Returns the value of this RDF.XSD.Facet on specific RDF.XSD.Datatype.

Link to this callback

fraction_digits_conform?(facet_constraint_value, value, uncanonical_lexical)

View Source
@callback fraction_digits_conform?(
  facet_constraint_value :: any(),
  value :: any(),
  RDF.XSD.Datatype.uncanonical_lexical()
) :: boolean()

Validates if a value and lexical conforms with a concrete facet_constraint_value for this RDF.XSD.Facet.

This function must be implemented on a RDF.XSD.Datatype using this RDF.XSD.Facet.

Functions

Link to this function

conform?(datatype, value, lexical)

View Source

Checks if a value and lexical conforms with the fraction_digits_conform?/3 implementation on the datatype RDF.XSD.Datatype.