BlockML Documentation

Suggestions

Hints for editors, never validation

Suggestions are Property-only metadata — Block instances compatible with the property's type, offered to editors and renderers as guidance, never enforced as validation.

Suggestions versus constraints

A constraint may fail validation when its validation property is set; a suggestion never does — authors may enter any value compatible with the property's type regardless of what the suggestions list offers.

Forbidden on EnumType properties

Suggestions are forbidden on properties typed with an EnumType, because valid values already come exclusively from that EnumType's own values catalogue.

Suggesting a few compatible values

A Property can offer a short list of compatible sample instances as suggestions, letting an editor present them without restricting authors to only those values.

<!-- Two suggested values for "caption" — neither is a required set -->
<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">
      <suggestions>
        <type:TextEntity value="Front Door" />
        <type:TextEntity value="Back Gate" />
      </suggestions>
    </caption>
  </properties>
</acme:Label>

Front Door and Back Gate are offered as convenient starting points for an editor filling in caption — an author remains free to write any other Text value on this property, since suggestions never restrict what may be authored.

What to carry into the next pages

After this page, readers should know suggestions are hints for tooling, never validation, before Expressions introduces dynamic member values.

Continue with expressions