Cold Help System: Building: CML


CML is used to markup text for dynamic generation and formatting. CML text is compiled to an internal abstraction called Ctext which can be easilly decompiled to plain text, HTML or any other format that may be desired. Ctext is also dynamically interpreted for each interface receiving the text. This gives extreme power in the final result, and is much faster than older MUD systems which use %x replacements in strings to achieve the same result.

The CML syntax is made of tags embedded within the text. Tags can be formatted one of two ways depending upon if they are for dynamic text generation (Generator) or as a formatting or other directive (Formatter):

Generator Format: [<name> <options>:<arguments>]
Directive Format: {<name> <options>:<arguments>}

Specific tag names may vary depending upon the system. For more information on the specific tags for this system see help on Formatters and Generators.

The exact behaviour of a tag may be controlled using options (sometimes called flags). Options can be in any order, and are specified in one of two ways:

key=value sets the option named key to value
key sets the option named key to true (if unspecified it will be false).

NOTE: If you need it include more than one word as the value, you have to backslash-escape the spaces, you cannot include the value in quotes.

Arguments (anything following the colon) Are optional, and depend upon the tag. How Arguments Are handled depends on whether the tag is a Generator or a Formatter. A Generator will treat it's Arguments as a space seperated list. A formatter will treat it's Argument as a single string, stArting at the first non-space chAracter following the colon. Arguments may contain other tags.

All tags with the exception of quote follow this syntax. quote can be used to include literal unparsed text in a document. It is similar to HTML's <pre> in that it includes any literal formatting of white space. However, it does NOT parse any formatters or generators within it's body. quote is formatted as:

{quote <text>}

Where <text> is anything, including curly braces. Note: there is no colon following quote, and there are no options for quote. Further information on CML and Ctext can be found at:

FormattersAbout CML Formatters
GeneratorsAbout CML Generators
CustomizingCustomizing Ctext


CML | Places | Commands


the Cold Dark