BlockML Documentation

Properties

A scalar or structured value member

A Property describes a Block member that carries a scalar or structured value — its type must resolve to a ValueType, and its value lives in the declaration's own value field.

Definition value versus instance payload

On the declaration, a Property's default lives in its value field — element form is preferred, and a compact attribute form is also valid, but never both on the same declaration.

On a Block instance the Property is a plain attribute or the element's direct content — never wrapped in value, which is a definition-only field, not a general instance-payload container.

Inheriting and overriding a Property

A child Block refining an inherited Property restates only the changed attributes with override="true" — an unchanged type should be omitted rather than repeated.

A typed Property with a default value

A Property declaration states its type and, when it has one, its default value — both as sibling fields on the same declaration element.

<!-- "caption" declares type Text and a default value -->
<acme:Label 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>
    <caption type="type:Text">
      <value>Untitled</value>
    </caption>
  </properties>
</acme:Label>

caption's declaration carries type Text and a value child holding the default, Untitled. An instance of Label would set this same property as a plain attribute, caption="Front Door", or as direct element content — never repeating the value wrapper shown on the declaration.

What to carry into the next pages

After this page, readers should be able to declare a typed Property with a default value and tell the definition-side value field apart from an instance-side payload, before Aggregations extend the member model to owned collections.

Continue with aggregations