Blocks
A Block is BlockML's basic unit
A Block is BlockML's basic unit: a named, typed definition with an explicit identity that other Blocks can extend, reference, or compose.
Naming a Block
A Block's name is a PascalCase class name — letters and digits only, starting with an uppercase letter — which keeps composition instance tags with xmlns prefixes unambiguous against camelCase member names. On a root Block, name is optional and, when present, must equal the last segment of the resolved type.
Defining a Block versus referencing one
Defining a Block means authoring its root document, where the element tag supplies its type; referencing a Block elsewhere means writing its FQN or an xmlns-qualified name at a member type or baseType site — the two are never confused because only one document can define a given FQN. The preferred document root tag is the type itself, such as acme:Widget, rather than a generic block wrapper.
Defining a small Block
Defining a Block requires only a type identity and a baseType — everything else, including documentation and members, may follow once identity is established.
<!-- The root tag "acme:Widget" supplies the type; name is optional here -->
<acme:Widget xmlns="http://blockml.org/bml"
xmlns:acme="com.acme.example"
xmlns:core="org.blockml.bml.core">
<name>Widget</name>
<baseType>
core:Block
</baseType>
</acme:Widget>
The root tag in the example is both the Block's type and, by the PascalCase rule, the basis of its name — the explicit name element only repeats that same last segment, Widget, and could equally have been omitted.
What to carry into the next pages
After this page, readers should be able to point at a Block's FQN, its definition file, and a place where it is used — the distinction the next page deepens into definitions and instances.