MicroStrategy ONE

Generating HTML Output Parametrically

Typically, the HTML output is generated programmatically in a Java transform class. However, you can override this output by generating the HTML output parametrically in an XML layout definition file. If a style in the Style Catalog Configuration file has both a transform and a layout definition file associated with it, the HTML output generated by the layout definition file will override the HTML output generated by the transform. Specialized MicroStrategy-specific tags, used in layout definition files, let you include logic, iterate through lists (including forcing the application to move to the next object in a list), and add arguments and attributes dynamically when generating HTML output, as well as actually rendering the resulting dynamic content. The interfaces for these tags do not generate specific HTML elements, but, instead, help to determine dynamically the HTML output being generated by the tags within which they are nested.

The diagram below illustrates the Tag infrastructure, including the TagsFactory class that instantiates tag objects and the specialized MicroStrategy-specific tag interfaces that can be used to generate HTML output parametrically.

Specialized MicroStrategy-specific tags are used exclusively with XML layout definition files, and the tag name for each element identifier is always preceded with mstrlayout: (used for namespacing). The code sample below, which simply renders content, illustrates this format:

Copy
<div class="description">
   <mstrlayout:rendername="FolderDescription" />
</div>

MicroStrategy Web also uses custom HTML tags, which have some resemblance to the MicroStrategy-specific tags, to generate HTML output. MicroStrategy-specific tag names are preceded with <mstrlayout: and generate HTML output from the XML in layout definition files. Custom HTML tag names, on the other hand, are preceded with <web: and generate HTML output from within JSP or ASP.NET files.

See also