BML: The Authoring Format
What authors actually write
BML is what authors actually write — the human- and editor-friendly representation of a BlockML model, with the .bml extension and XML as its sole current serialization.
Root, Sub-Block, and embed authoring
A document root or embedded Block uses its qualified type as the element tag; a Sub-Block uses its unqualified name as the tag — the same identity-as-tag principle this handbook has used in every earlier example.
BML to BOM, and the domain-agnostic compiler
The compiler that reads BML and produces the BOM understands only BML and the BOM object model — every domain-specific meaning this handbook has covered lives in the authored Blocks themselves, never in the compiler.
A complete small BML document
A complete BML document combines identity, required documentation fields, and at least one member — everything this handbook has introduced, in one small file.
<!-- Identity, is, documentation, and one property — one complete BML document -->
<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>
<is>
A basket with a counted quantity
</is>
<documentation>
Holds a count of items.
</documentation>
<properties>
<count type="type:Integer">
<value>3</value>
</count>
</properties>
</acme:Basket>
Every field in the example traces back to an earlier page — the qualified tag and baseType from Blocks, is and documentation from Documenting Blocks, and the count property from Properties — brought together as one authored BML file.
What to carry into the next page
After this page, readers should be able to identify a Block document's root element and format, before BML Namespaces covers the xmlns declarations every one of this handbook's examples has relied on.