Primitive Types
Atomic scalar semantics
PrimitiveType is the abstract branch for built-in scalar ValueTypes — PrimitiveTypes describe semantics only and never store concrete values themselves.
The built-in primitive branches
PrimitiveType organizes into a numeric branch, a textual branch, a temporal branch, and two standalone branches for Boolean and Duration that belong to neither. Every built-in primitive belongs to exactly one of these branches:
- Number
Integer, Decimal, and Float.
- Text
Text and its subtypes such as Color, URL, and Version.
- Temporal
Date, Time, and DateTime.
- Boolean and Duration
Boolean is neither textual nor numeric; Duration is a sibling of Temporal, not one of its subtypes.
Values live only in Properties
A PrimitiveType such as Integer describes what a value may be, but never carries one — an authored value belongs exclusively to a Property whose type is that PrimitiveType.
A property with a primitive value
A Property typed Integer carries its default value in the Property's own value field — never as an attribute on the Integer type itself.
<!-- "count" is typed with the PrimitiveType Integer; its value lives on the Property -->
<acme:Basket xmlns="http://blockml.org/bml"
xmlns:acme="com.acme.example"
xmlns:core="org.blockml.bml.core"
xmlns:type="org.blockml.bml.type">
<baseType>
core:Block
</baseType>
<properties>
<count type="type:Integer">
<value>3</value>
</count>
</properties>
</acme:Basket>
In the example, type:Integer only names the branch; the concrete number, 3, is carried entirely by count's value field, matching the rule that PrimitiveTypes never store values themselves.
What to carry into the next pages
After this page, readers should be able to list the built-in primitive branches and place a value correctly on the owning Property, before moving to the composite StructType branch.