Skip Headers

Oracle® Health Sciences Empirica Topics API Guide Release 8.0 E55424-01 |
| Contents

Previous | Next |

# A XML attachment tables

The XML for the attachment type TABLE contains metadata for each of the columns, including the type, notes, and the rows of data.

Each column has the format specified in the `<DBType>` element. The integer value for each data type is determined by the integer values in Java and their respective SQL data types:

Table A-1 Data types

Value | Data Type | Description
--- | --- | ---
2 | NUMERIC | Specifies one of the following: An integer, such as 25. A double formatted value, such as 64-bit IEEE 754. A floating point number, with up to 6 digits after the decimal point, such as 25.123456 or 0.123.
12 | VARCHAR | Specifies a string.
91 | DATE | Specifies a date without time in a string using the ISO8601 format, such as 1997-07-16 in the format YYYY-MM-DD.
93 | TIMESTAMP | Specifies a timestamp with the date and time in a string using the ISO8601 format, such as 1997-07-16T19:20:30Z in the format YYYY-MM-DDThh:mm:ssZ where: The letter T separates the date and time, including hours, minutes, and seconds. The letter Z follows the time and represents the UTC time zone. Dates are formatted in the UTC time zone (Coordinated Universal Time).

## XML—attachment type: TABLE

    <TableData>
        <MetaData>
          <TableTitle>[String Value]</TableTitle>
          <MultiRowHeading>Y|N</MultiRowHeading>
          <Column name="[String Value]">
                     <Label>[String]</Label>
             <DBType>2|12|91|93</DBType>
                     <ToolTip>[String Value]</ToolTip>
             <Visible>Y|N</Visible>
          </Column>
          <Column name="[String Value]">
                     <Label>[String]</Label>
             <DBType>2|12|91|93</DBType>
                     <ToolTip>[String Value]</ToolTip>
             <Visible>Y|N</Visible>
          </Column>
          <Column name="[String Value]">
                     <Label>[String]</Label>
             <DBType>2|12|91|93</DBType>
                     <ToolTip>[String Value]</ToolTip>
             <Visible>Y|N</Visible>
          </Column>
          <Notes>
                     <NotesDetail title="[String Value]">[HTML Formatted String Value]</NotesDetail>
                     <NotesDetail title="[String Value]">[HTML Formatted String Value]</NotesDetail>
                     <NotesDetail title="[String Value]">[HTML Formatted String Value]</NotesDetail>
          </Notes>
        </MetaData>
        <Row>
                  <Column name="[String Value]">[String Value]</Column>
                  <Column name="[String Value]">[String Value]</Column>
                  <Column name="[String Value]">[String Value]</Column>
        </Row>
        <Row id="[String Value of Row Number]">
                  <Column name="[String]">[String Value]</Column>
                  <Column name="[String]">[String Value]</Column>
                  <Column name="[String]">[String Value]</Column>
        </Row>
    </TableData>

The above XML code illustrates the format for the XML that is streamed for TABLE attachments. The `<Metadata>` contains the column definitions, an optional title or header above the table and notes. The contents of notes for tables are determined by `<Notes>` and `<NotesDetail>` XML elements. The XML must contain all these elements except for `<NotesDetail>`. The `<Row>` elements contain the data for the table, and optional notes for the table. See Figure 2-10 and Figure 2-11. The rows of the table are determined by XML children of the `<TableData>` element that is streamed with the attachment.

1. `<MetaData>`—Define `<MetaData>` as a child of `<TableData>` and define the following child elements of `<MetaData>`.

   1. `<TableTitle>`—Define with optional text to be displayed above the table for additional information about the data, such as a filter. You must set the content of this element to empty `<TableTitle/>` if there is no text to display.

   2. `<MultiRowHeading>`—Define with content of Y or N. Set the value to Y to display two rows of column headers when the attachment is displayed. The first row displays the first word of each column label and the second row displays the rest of each label. For example, use this if you have two rows of columns in your table where the first row has the same word across more than one column and the second row has a distinguishing label.

      The following column headers appear if MultiRowHeader is set to Y.

      All N Since 2010 | All EBGM 2012 | Serious N Since 2010 | Serious EBGM 2012

      If the value to set to N, then only one row of column headers is displayed.

      The following column headers appear if MultiRowHeader is set to N.

      All N Since 2010 | All EBGM 2012 | Serious N Since 2010 | Serious EBGM 2012

   3. `<Column>`—Specify a list of `<Column>` header elements where there is one column element for each column header in your attachment. Set the name attribute to an arbitrary string that is used to match the same column name attribute in the `<Row>` elements that contain the row data.

      - `<Label>`—Set the `<Label>` content to the text to display in the column header.

      - `<DBType>`—Set the `<DBType>` content to the column type integer value as described in Table A-1. This value is used for formatting values in the table such as left or right justification of the text. Numbers are right aligned. All other types are left aligned.

      - `<ToolTip>`—Set the `<ToolTip>` content to the text to display for the tooltip on the column name or `<ToolTip/>` if there is no tooltip.

      - `<Visible>`—Set the `<Visible>` content to the default visibility of the column. Set to Y to show this column by default or N to hide this column. Users can select the Columns link to show or hide columns when viewing the attachment.

   4. `<Notes>`—Define children for the `<Notes>` elements to display the Show Notes link above the table when the attachment is displayed. If you do not have notes, then you must specify an empty notes element `<Notes/>` and the Show Notes link will not be displayed in the attachment.

      Notes are displayed as a table with two columns. The `<Notes>` tag has one or more optional `<NotesDetail>` child elements. Define the title attribute to the text for the first column of the note table such as a note row label. Define the content of the `<NotesDetail>` for text of the second column, such as a note row value or `<NotesDetail/>` if there is no text for this row. The `<NotesDetail>` content can optionally contain HTML tags for formatting and can contain HTML `<table>` related tags to embed a table in the second column of the notes.

2. `<Row>`—Define a list of `<Row>` elements with one `<Row>` for each row in your table. For each `<Row>`, define the following child elements.

   1. `<Column>`—You must define one `<Column>` child element for each `<Column>` element that is a child of the `<Metadata>` element, and define the same name attribute. This name can be any unique name for the column. Set the content of this element to the text to be displayed in the content of this column's row in the table.

      If the column name is set to reviewed or excluded which are used by Empirica applications, then any data in those columns are left aligned regardless of the DBType attribute. The values of the rows for these column names are displayed as YES if set to 1 or NO if set to 0.