Document Type Declaration


Please use the DTD available for validating your SMXML. If it doesn't validate it may not render correctly! Valid SMXML is not mandatory, it's a debug convenience. You may choose to omit the DTD.

If you wish to extend SMAF with your own custom UI components and still have SMXML validate then please write and publish your own DTD by extending the existing one.

Remember! Once you omit the DTD you have no guarantee that your SMXML will render (correctly).




Node and attribute names


Please keep all node and attribute names lowercase at all times. This to eliminate confusion or doubt about using upper and lowercase characters in the markup. Attribute or node values of course can contain any characters according to XML formatting rules.

<!DOCTYPE composer SYSTEM "http://dtd.samplemath.com/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="20" y="40"/>
</composer>





Numeric attribute values


Position, dimension and other information may use numeric values in attributes. The proper way to format SMXML is to always contain numeric values between single or double quotes. This applies to percentage values as well.

WRONG:

<box id="leftBox" width=200 height=40% x=20 y=20/>

CORRECT:

<box id="leftBox" width="200" height="40%" x="20" y="20"/>





Boolean attribute values


Boolean values in attributes may be represented by true/false or 1/0. All boolean values should be wrapped in quotes at all times. Both of the examples below are CORRECT:

<box id="leftBox" width="200" height="40" x="20" y="20" visible="0"/>

or

<box id="leftBox" width="200" height="40" x="20" y="20" visible="false"/>





Color values


Color values are used in style declarations and they are always the text value of a color, selectedcolor or selectioncolor node. You may specify color values in AS3 hexadecimal format or as RGB. See examples below:

<color>0xff0000</color>

or

<color>rgb(255,0,0)</color>

There are 5 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki