Skip to content
Alpha: see what works today →
Menu

cascade:decimalValue decimal value

https://ns.cascadeprotocol.org/cascade#decimalValue

The number as an xsd:decimal in XSD's canonical form, for comparing, sorting and bounds: no exponent, no leading zero but the one before a point, no trailing zero after it, no point when it is a whole number, and no sign on zero. A number the source wrote with an exponent is written out in full.

Type
owl:DatatypeProperty
Domain
cascade:Quantity
Range
xsd:decimal
Shapes
  • cascade:QuantityShape: datatype xsd:decimal; minCount 1; maxCount 1; pattern "^(-?[1-9][0-9]*|-?0\\.[0-9]*[1-9]|-?[1-9][0-9]*\\.[0-9]*[1-9]|0)$" A quantity has one decimal value, an xsd:decimal in XSD's canonical form: a number two runtimes write alike, whatever form the source wrote it in.

cascade:QuantityShape checks the subject of any cascade:decimalValue, cascade:writtenValue, cascade:quantityComparator, cascade:ucumUnit, cascade:unitText.

  • cascade:decimalValue: datatype xsd:decimal; minCount 1; maxCount 1; pattern "^(-?[1-9][0-9]*|-?0\\.[0-9]*[1-9]|-?[1-9][0-9]*\\.[0-9]*[1-9]|0)$" A quantity has one decimal value, an xsd:decimal in XSD's canonical form: a number two runtimes write alike, whatever form the source wrote it in.
  • cascade:writtenValue: datatype xsd:string; minCount 1; maxCount 1; pattern "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)([eE][+-]?[0-9]+)?$" A quantity has one written value, the number as the source wrote it: digits, an optional sign, point and exponent.
  • cascade:quantityComparator: datatype xsd:string; maxCount 1; in ( "<" "<=" ">=" ">" ) A quantity has at most one comparator, one of <, <=, >= and >: = is written as none, and ~, <> and ad are refused, since no rule can compare them.
  • cascade:ucumUnit: datatype xsd:string; maxCount 1; minLength 1 A quantity has at most one UCUM unit, a non-empty string.
  • cascade:ucumUnit: pattern "^[!-~]+$" warning A UCUM code is printable ASCII with no space; this one is likely not UCUM, though its source said it was.
  • cascade:unitText: datatype xsd:string; maxCount 1; minLength 1 A quantity has at most one unit text, a non-empty string.
Where it comes from and what uses it
See also
https://www.w3.org/TR/xmlschema11-2/#decimal
Queries