Root composer
The root element of every SMXML composition should always be a composer as shown in the example below.
<!DOCTYPE composer SYSTEM "http://samplemath.com/smaf/smxml.dtd">
<composer>
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
</composer>
<composer>
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
</composer>
Even if you only need to render a box you should always wrap it in a composer. The example below shows invalid SMXML composition. You may only use invalid chunks of SMXML to update UI components directly or for adding them to a composer's composition.
<!DOCTYPE composer SYSTEM "http://samplemath.com/smaf/smxml.dtd">
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
Inline composition
You may define the composition directly in the composer's markup.
<!DOCTYPE composer SYSTEM "http://samplemath.com/smaf/smxml.dtd">
<composer>
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
<box id="leftBox" width="200" height="40" x="20" y="20" />
<box id="rightBox" width="200" height="80" right="2" y="40" />
</composer>
<composer>
<box id="background" width="100%" height="100%" alpha=".1" rounded="24"/>
<box id="leftBox" width="200" height="40" x="20" y="20" />
<box id="rightBox" width="200" height="80" right="2" y="40" />
</composer>
There is one comment on this page. [Display comment]