XData Blocks
Introduction
An XData block is a named unit of well-formed XML that you include in a class definition. The purpose of this block is to contain structured information for some particular purpose for use by the class after compilation.
Details
An XData block has the following structure:
/// description XData name [ keyword_list ] { data }
Where:
-
description (optional) is intended for display in the Class Reference. The description is blank by default. See “Creating Class Documentation” in Using Caché Objects.
-
name (required) is the name of the XData block. This must be a valid class member name, and must not conflict with any other class member names.
-
data (optional) if included, must be a well-formed unit of XML (with a single root element), without the XML declaration at its start.
-
keyword_list (optional) is a comma-separated list of keywords that further define the XData block.
See the section “XData Keywords.”
If this list is omitted, also omit the square brackets.
Example
XData Contents [ XMLNamespace="http://www.intersystems.com/zen" ]
{
<page xmlns="http://www.intersystems.com/zen" title="HelpDesk">
<html id="title">My Title</html>
<hgroup>
<pane paneName="menuPane"/>
<spacer width="20"/>
<vgroup width="100%" valign="top">
<pane paneName="tablePane"/>
<spacer height="20"/>
<pane paneName="detailPane"/>
</vgroup>
</hgroup>
</page>
}
See Also
-
“Defining and Using XData Blocks” in Using Caché Objects
-
“XData Keywords” in this book
-
“Class Limits” in “General System Limits” in the Caché Programming Orientation Guide