# Creating a Style Sheet

A style sheet consists of optional definitions for system-generated number tokens, followed by sets of element path statements and their formatting specifications. To create a style sheet for use with the Information Manager, follow these steps:

1. Open a new file, using a text editor such as `vi` or `emacs`, or an SGML editor.

2. In the file, identify the style sheet name by giving a value to the Name attribute of the StyleSheet element. For example:

       <StyleSheet name=sty1>

   This name must be unique across style sheets in a bookcase.

3. If you plan to use the `AutoNumber` feature, create an autonumber for each token stream. System-generated number tokens can be used only with the Prefix and Suffix features. For example:

       <AutoNumber id=num0  reset=enumeratedlist  counter=numitem  type=ucroman  initial="1">
       <AutoNumber id=num1  reset=enumeratedlist  counter=numitem  type=lcroman  initial="1">
       <AutoNumber id=num2  reset=enumeratedlist  counter=numitem  type=arabic  initial="1">

   For more information on using the autonumber feature, see AutoNumbers in the `dtinfoStyle.dtd(5)` man page.

4. Using an element `Path` statement, specify the path to the element for which you are defining the style. `Path` statements are read left to right, parent element to child element. You need only specify the minimum unique path to any given element. This example specifies the path to the LITERALLAYOUT element:

       <Path>LITERALLAYOUT</Path>

5. For each `Path` you must specify either the `Online` feature set or the `Print` feature set, or both. To specify both, you must define the on-line features first. For example:

       <Path>
       LITERALLAYOUT</Path>
       <Online>
          <Font fallback=mono>
          <Family name=courier weight=medium size=12 charset=iso8859-1>
          <Layout flow=verbatim lindent=12 aspace=6 bspace=6>
          <LineBreak both>
       </Online>
       <Print>
          <Font fallback=mono>
          <Family name=courier weight=medium size=12 charset=iso8859-1>
          <Layout flow=verbatim lindent=12 aspace=6 bspace=6>
          <LineBreak both>
       </Print>

   The `Print` and `Online` feature sets match in function, description, and specification except for two print-specific exceptions: Medium and PageBreak.

6. Repeat steps 4 and 5 for each element `Path` for which you want to specify a particular style.

## Using Style Features

The style features discussed in this chapter are:

Font Features

- Font

- HighLight

Layout Features

- Layout

- LineBreak

- Margin

- Position

Print-specific Features

- Medium

- PageBreak

Table Features

- Table

- ColFormat

- Row

- Cell

- TGroup

Other Features

- Border

- Ignore

- Prefix and Suffix

## Font Features

The style sheet features described in this section— Font, and HighLight— are related to the appearance of text in the Information Manager browser.

### Font

The `Font` feature specifies font families and character sets, and font attributes. The syntax of the `Font` feature contains font attribute specifications, followed by any number of `Family` subfeatures, in which the font family and character sets are specified.

The `Font` feature eliminates character set ambiguities. Here's the syntax:

    <Font
     Fallback = {sans | serif | mono | symbol | mincho | gothic}
     Position = {subscript | sub | superscript | super | baseline}
     Size = [0-9]+
     Slant = {italic| roman}
     Spacing = {char | prop | mono}
     Style = "string"
     Weight = {bold| medium}
     Width = {normal | narrow}>
    <Family
     Name = "string"
     Charset = "string"
     Foundry = "string" >
    </Font>

#### Font Attributes

The `Font` attributes define the typography of the specified element. The following font attributes are used by all font families in the Information Manager browser.

`Fallback`

- The `Fallback` attribute specifies the font family to use if the desired `Family` is not available on the font server. The available options map to the following Information Manager X resources, which are shown with the default values provided in the global X resources file. If the `Fallback` attribute is not specified, the default is `sans`.

  `sans`

- Specifies a sans serif font. The `Dtinfo*FontSans` default is `-dt-application-medium-r-normal-sans-*-*-*-*-p-*-iso8859-1`.

`serif`

- Specifies a serif font. The `Dtinfo*FontSerif` default is `-dt-application-medium-r-normal-serif-*-*-*-*-p-*-iso8859-1`.

`mono`

- Specifies a mono-spaced font. The `Dtinfo*FontMono` default is `-dt-application-medium-r-normal-serif-*-*-*-*-m-*-iso8859-1`.

`symbol`

- Specifies a symbol font. The `Dtinfo*FontSymbol` default is `-dt-application-medium-r-normal-*-*-*-*-*-p-*-dtsymbol-1`.

`mincho`

- The default is `Dtinfo*FontMincho`.

`gothic`

- The default is `Dtinfo*FontGothic`.

`Position`

- Specifies where text should be placed relative to the baseline. The options are: `superscript` (above the baseline) and `subscript` (below the baseline). You can use the terms `super` and `sub` as shorthand for `superscript` and `subscript`.

`Size`

- Specifies the font size in points. The default is 14 points.

`Slant`

- The values for the `Slant` attribute are `roman` or `italic`. The default is `roman`.

`Spacing`

- Specifies character spacing, either `prop` (proportional), `char` (character cell), or `mono` (monospaced). The default is `char`.

`Style`

- Specifies additional style information. The default is no additional style information.

`Weight`

- Specifies the weight of the font, either `medium` (regular) or `bold` (thick). The default is `medium`.

`Width`

- Specifies the width of the font, either `normal` or `narrow`. The default is `normal`.

#### Font Family Subfeature

The `Family` subfeature specifies one or more font families and character sets. The following list defines the attributes for the `Family` subfeature:

`Family`

- The `Family` attribute specifies the font family and character sets used for display in the Information Manager browser. The possible `Family` values are strings specifying:

  `Foundry`

- The name of the font company. `Foundry` is an optional parameter.

`Name`

- The name of the font. `Name` is a required parameter.

`Charset`

- The name of the encoding standard to which the font conforms. `Charset` is a required parameter.

The specified font names and character sets must be available on the font server of the system that will be displaying the Information Manager documents. If no `Family` specifications are used, the element uses the font specified with the `Fallback` attribute of the `Font` feature.

The following example illustrates an online path statement that uses `Font` and `Family` attributes:

    <Path>
    PARA</Path>
    <Online>
       <Font  Fallback=sans  Weight=medium  Slant=roman  Size=12  Spacing=prop  Slant=italic  Width=normal>
       <Family  Name=helvetica  Charset=iso8859-1>
    </Online>

##### Font Inheritance

The `Font` feature is inherited. Inheritance determines the set of fonts and font characteristics that will be applied to inheriting elements. To mask out a font face, both the font `Family` feature and the `Charset` attribute must be set. Masking occurs because of the `Charset` attribute.

To change an element's inherited font characteristics, you need only change the appropriate `Font` feature, not the complete `Font/Family` specification. For example:

    <Font Weight=bold>

would be sufficient to change an inherited characteristic for a given element.

### HighLight

The `HighLight` feature specifies font-independent display highlights. The `HighLight` feature is inherited. Its syntax is:

    <Highlight
    BGColor = "colors"
    FGColor = "colors"
    Overline = {true | false}
    StrikeThrough = {true | false}
    Underline = {true | false}>

Reverse video, and background and foreground colors are supported in the `Online` feature sets only. Boxed, overline, strike through, and underline can be used in both the `Print` and `Online` feature sets. The default background and foreground colors are defined in the X resources file.

The `HighLight` feature has the following attributes.

`BGColor`

- Specifies screen background color. You can choose from any X Window System color name.

`FGColor`

- Specifies screen background color. You can choose from any X Window System color name.

`Overline`

- Draws a line above the element. Attribute values are `true` and `false`.

`StrikeThrough`

- Draws a line through the element. Attribute values are `true` and `false`.

`Underline`

- Draws a line below the element. Valid values are `true` and `false`.

This example shows a `Path` statement for underlining a TERM element.

    <Path>
    VARLISTENTRY TERM</Path>
    <Online>
       <Highlight  underline=true>
    </Online>
    <Print>
       <Highlight  underline=true>
    </Print>

## Layout Features

The style sheet features described in this section— Layout, LineBreak, Margin, and Position— are related to the layout of screens and pages in the Information Manager browser.

### Layout

The `Layout` feature specifies element spacing, indentation, and text flow formatting. The syntax for `Layout` is:

    <Layout
    ASpace = [0-9]+
    BSpace = [0-9]+
    Leading = [0-9]+
    FIndent = [0-9]+
    LIndent = [0-9]+
    RIndent = [0-9]+
    Flow = {verbatim | filled}
    Justify = {left | right | center}
    Wrap = {block | join | none}>

Possible formatting attributes are:

`ASpace`, `BSpace`

- These attributes specify the space in points above and below the current element. The default value is 10 points.

`Leading`

- The `Leading` attribute specifies the inter-line space, in points, between the baseline of one line of text and the top of the highest ascending character of the following line. The default value is 2 points.

`FIndent`, `LIndent`, `RIndent`

- These attributes specify the first, left, and right indents, respectively, of a text element. Each value, expressed in points, is relative to any surrounding elements or to the value set with the `Margin` feature. The default value is 0 (zero).

`Flow`

- The `Flow` attribute specifies how the whitespace and linefeed characters in the current element are to be handled.

  `verbatim`

- If the value `verbatim` is chosen, whitespace and linefeed characters are considered significant. That is, the text line is not automatically wrapped but is allowed to extend beyond the text margin and the window border until a linefeed character is encountered. The value `verbatim` also causes the horizontal scroll bar to be displayed as necessary to accommodate the text line.

`filled`

- If the value `filled` is chosen, whitespace and linefeed characters are not considered significant and the text line is wrapped if it extends beyond the window border. The default value is `filled`.

`Justify`

- The `Justify` attribute specifies how text lines within the current element are to be aligned.

  `left`

- The value `left` causes text lines to be aligned along the left margin, while the right margin runs ragged.

`right`

- The value `right` causes text lines to be aligned along the right margin, while the left margin runs ragged.

`center`

- The value `center` causes text lines to be aligned to the center, with ragged left and right margins.

`Wrap`

- The `Wrap` attribute works with the Position feature and specifies how text within the current element should flow.

When the `Wrap` attribute and the `Position` feature are used, the LineBreak feature is ignored.

`Layout` is an inherited feature.

This example uses the `Layout` feature:

    <Path>
    LITERALLAYOUT</Path>
    <Online>
       <layout  Flow=verbatim  LIndent=12  ASpace=6  BSpace=6  Leading=4>
    </Online>

### LineBreak

The `LineBreak` feature inserts a line break before and/or after the current element. The syntax is:

    <LineBreak {before | after | both}>

The three possible values for `LineBreak` are:

`before`

- Inserts a line break before the current element.

`after`

- Inserts a line break after the current element.

`both`

- Inserts a line break both before and after the current element.

`LineBreak` is not inherited.

This example uses `LineBreak` with a value of `both`:

    <Path>
    PREFACE TITLE</Path>
    <Online>
       <LineBreak  both>
       <Fontsize=20 weight=medium>
       </Online>
    <Print>
       <LineBreak&  both>
       <Font  size=24 weight=bold>
    </Print>

### Margin

The `Margin` feature specifies the boundaries of the document rendering area, in points.

    <Margin
    Bottom = [0-9]+
    Top = [0-9]+
    Left = [0-9]+
    Right = [0-9]+>

The values for the `Margin` attribute are:

`Bottom`

- Specifies the vertical space following the last line on the screen or page.

`Top`

- Specifies the vertical space preceding the first line on the screen or page.

`Left`

- Specifies the distance between the left edge of the element and the left edge of the screen or page.

  For on-line margins, the system uses 18 points of space in the left margin for items such as Bookmark icons. Thus, any value assigned to `Left` (for on-line rendering) would be in addition to the 18-point system-defined setting.

`Right`

- Specifies the distance between the right edge of the element and the right edge of the screen or page.

The `Margin` feature is inherited and should only be used on the root element of an element hierarchy. Here's an example of a `Path` statement containing `Font`, `Family`, and `Margin` attributes:

    <Path>
    CHAPTER</Path>
    <Online>
       <Font  Fallback=sans  Weight=medium  Slant=roman Size=18>
       <Family  Name=helvetica  Charset=iso8859-1>
       <Margin  Left=6  Right=12  Top=18  Bottom=18>
    </Online>
    <Print>
       <Font  Fallback=sans  Weight=medium  Slant=roman  Size=24>
       <Family  Name=helvetica  Charset=iso8859-1>
       <Margin  Left=18  Right=18  Top=18  Bottom=18>
    </Print>

### Position

The `Position` feature is used with the `Wrap` attribute of the Layout feature to specify where the current element should start relative to the defined margins, and how text should flow in the current and succeeding elements.

    <Position
    Horiz = {lcorner | left | lmargin | center | rcorner | Right | rmargin}
    Vert = {bottom | middle | top}>

The `Position` feature is not inherited.

## Print-specific Features

The style sheet features described in this section— `Medium`, and `PageBreak`— are specific to Information Manager print functionality.

### Medium

The `Medium` feature specifies the orientation and size of the print medium. The `Medium` feature is inherited and should be specified at the root-level of an element hierarchy.

    <Medium
    Orientation = {landscape | portrait}

The `Medium` feature has an `Orientation` attribute, which specifies the orientation of the text on the printed page. Values for the `Orientation` attribute are `landscape` and `portrait`.

Here is an example `<Path>` statement using the `Medium` feature:

    <path>CHAPTER
    </path>
    <print>
       <Medium Orientation="portrait">
    </print>

### PageBreak

The PageBreak feature inserts a page break before and/or after the current element. The syntax is:

    <PageBreak {before | after | both}>

The three possible values for `PageBreak` are:

`before`

- Inserts a page break before the current element.

`after`

- Inserts a page break after the current element.

`both`

- Inserts a page break both before and after the current element.

The `PageBreak` feature is not inherited.

This example uses `PageBreak` with a value of `before`:

    <Path>SECT1 TITLE
    </Path>
    <Print>
       <PageBreak  before>
       <Font  size=30 weight=bold>
    </Print>

## Table Features

The style sheet features described in this section— Table, ColFormat, Row, Cell ColSep, Frame, and Rowsep — are related to the formatting of Information Manager tables. A set of `Path` statements illustrating the use of the set of `Table` features is provided at the end of the section. (See Table Example.)

### Table

The `Table` feature is used to format a two-dimensional grid. The style sheet parsing cannot check for the use of `Cell`, `ColFormat`, or `Row` features on child elements of any element where `Table` is used. Users must verify these features manually. `Table` syntax is:

    <Table
    ColSep = "integer"
    Frame ={ Top | Bottom | TopBot | Sides | All | None }
    RowSep = "integer"
    >

The `Table` feature has the following attributes:

`ColSep`

- The `ColSep` attribute specifies whether or not a vertical rule (line) is to be displayed at the right edge of the cells in the table. A value of 0 indicates false, any integer other than 0 indicates true.

`Frame`

- The `Frame` attribute controls the placement of rulings (lines) around the outer edges of the TGroups that form the body of a Table. There are three primitive values (`Top`, `Bottom`, `None`), and three compound values (`TopBot`, `Sides`, `All`). The default is `None`.

`Rowsep`

- The `Rowsep` attribute specifies whether or not a horizontal rule (line) is to be displayed at the bottom edge of cells in the table. A value of 0 indicates false, any integer other than 0 indicates true.

    <Path>
    TABLE</Path>
    <Online>
       <Table Cols=3>
    </Online>
    <Print>
       <Table Cols=3>
    </Print>

The `Table` feature is not inherited.

### TGroup

The `TGroup` feature specifies the formatting for a portion of a table. Note that the style sheet parser cannot check for the use of `Cell`, `ColFormat`, or `Row` features on child elements of the element where `TGroup` is used, so users must check manually.

The TGroup feature has the following attributes:

`CharAlign`

- The `CharAlign` attribute specifies the character to use as the alignment point within cells if the TGroup's `Justify` attribute is set to `Char`. The default is the period character.

`ColSep`

- The `ColSep` attribute specifies whether or not a vertical rule (line) is to be displayed at the right edge of cells in the table. A value of 0 indicates false, any integer other than 0 indicates true.

`Justify`

- The `Justify` attribute specifies horizontal alignment of text in the cells of the table. For `Left`, textlines are aligned along the left margin and ragged on the right. For `Right`, textlines are aligned along the right margin and ragged on the left. For `Center`, textlines are ragged on both margins and aligned along the center of the element. The `Char` option aligns text— usually numbers— with two characters in each line to the right of the character specified by the CharAlign attribute, and the rest of the line to the left. The default value for the `Justify` attribute is Left. Note that CALS tables specify a value of "justify" (meaning both left- and right-aligned text)— this is not supported.

`RowSep`

- The `RowSep` attribute specifies whether or not a horizontal rule (line) is to be displayed at the bottom edge of cells in the table. A value of 0 indicates false, any integer other than 0 indicates true.

`VJustify`

- The `VJustify` attribute specifies vertical positioning of the content of cells in the table. The differences among the three settings are only noticeable for cells whose content does not fill the cell from top to bottom. For `Top`, the content is started at the top of a cell and may complete before the bottom of the cell. For `Bottom`, the content ends at the bottom of a cell; there may be unused space above the content. For `Middle`, the content is vertically centered in a cell. The default value for the `VJstify` attribute is `Top`.

    <TGroup
     CharAlign = "char"
     ColSep = "integer"
     Justify = { Left | Right | Center | Char }
     RowSep = "integer"
     VJustify = { Top | Middle | Bottom }
    >

The `TGroup` feature is not inherited.

### ColFormat

The `ColFormat` feature specifies the formatting for individual columns in a table. You use one `ColFormat` feature for each column in the table, in left-to-right order. If a table instance has 10 columns and the containing `Table` element (which uses the `Table` feature) has `ColFormat` features for only 8 of the columns, the last two columns get the default values of the last specified `ColFormat` feature.

    <ColFormat
     Charalign = "char"
     ColSep = "integer"
     Justify = {left | right | center | char}
     Name = "string"
     RowSep = "integer"
     Width = [0-9]+
    >

The `ColFormat` feature has the following attributes:

`Charalign`

- Specifies the character to use in columns where the `Justify` attribute is set to `Char`. The default is the period (.) character.

`ColSep`

- The `ColSep` attribute specifies whether or not a vertical rule (line) is to be displayed at the right edge of cells in columns that use this format. A value of 0 indicates false, any integer other than 0 indicates true.

`Justify`

- Specifies how to handle text lines in the column. Possible values are:

  `left`

- Aligns the text to the left margin. The right margin runs ragged.

`right`

- Aligns the text to the right margin. The left margin runs ragged.

`center`

- Aligns the text to the center of the element. The left and right margins run ragged.

`char`

- Aligns text, usually numbers, with two characters in each line to the right of the character specified by the `CharAlign` attribute. The rest of the characters align left.

The default value for the `Justify` attribute is `left` in Information Manager, unlike CALS tables, in which the `justify` attribute value specifies left and right alignment.

`Name`

- The `Name` attribute is a string that is used by the `Cell` feature to reference the particular column formatting (`ColFormat`) attributes to use.

`RowSep`

- The `RowSep` attribute specifies whether or not a horizontal rule (line) is to be displayed at the bottom edge of cells in columns that use this format. A value of 0 indicates false, any integer other than 0 indicates true.

`Width`

- The `Width` attribute specifies the width of the column relative to other columns.

  For example, if three column formats are referenced from a row, their width values divided by their total widths will determine the amount of space used. Thus, if column A has a width value of 90, and columns B and C each have width values of 180, column A will be formatted to use 20% (90/450).

  If the `Width` attribute is not specified, the rows of the column instance are examined, and the widest segment found there is used as the default width of that column.

The `ColFormat` feature is not inherited.

Here is an example of a path statement using the `ColFormat` feature:

    <Path>
    TABLE</Path>
    <Online>
       <ColFormat Cols=3  Justify=left  Name="column1"  Width=90>
    </Online>
    <Print>
       <ColFormat Cols=3  Justify=left  Name="column1"  Width=90>
    </Print>

### Row

The `Row` feature identifies the beginning of a row, typically in a table. It can be used with `Cell` and `Table`.

    <Row>

    <Row
     RowSep = "integer"
     VJustify = { Top | Middle | Bottom }
    >

The `Row` feature has the following attributes:

`Rowsep`

- RowSep specifies whether or not a horizontal rule (line) is to be displayed at the bottom edge of cells in the row. A value of 0 indicates false, any integer other than 0 indicates true.

`VJustify`

- The `VJustify` attribute specifies vertical positioning of the content of cells in the row. The differences among the three settings are only noticeable for cells whose content does not fill the cell from top to bottom. For `Top`, the content is started at the top of a cell and may complete before the bottom of the cell. For `Bottom`, the content ends at the bottom of a cell; there may be unused space above the content. For `Middle`, the content is vertically centered in a cell. The default value for the `VJustify` attribute is `Top`.

The `Row` feature is not inherited.

    <Path>ROW
    </Path>
    <Online>
       <Row>
    </Online>
    <Print>
       <Row>
    </Print>

### Cell

The `Cell` feature specifies the formatting to use for a cell. It also identifies the beginning of the cell and defines its horizontal and vertical spans.

    <Cell
     CharAlign = "char"
     ColRef = "string"
     ColSep = "integer"
     ColStart = "string"
     ColEnd = "string"
     Justify = { Left | Right | Center | Char }
     SpanRows = [0-9]+
     VJustify = { Top | Middle | Bottom }

The `Cell` feature has the following attributes:

`CharAlign`

- The `` attribute specifies the character to use as the alignment point in cells where the Justify attribute is set to Char. The default is the period (.) character.

`ColRef`

- The `ColRef` attribute is a string that references the name of the column format (ColFormat) to use for formatting the cell.

`ColSep`

- The `ColSep` attribute specifies whether or not a vertical rule (line) is to be displayed at the right edge of the cell. A value of 0 indicates false, any integer other than 0 indicates true.

`ColStart`

- The `ColStart` attribute refers to the column (defined by the named `ColFormat`) to use as the starting (leftmost) column for a horizontally-spanned cell. If `ColEnd` isn't also specified, `ColStart` serves the same purpose as `ColRef`.

`ColEnd`

- The `ColEnd` attribute refers to the column (defined by the named `ColFormat`) to use as the rightmost column for a horizontally-spanned cell. Ignored if `ColStart` isn't also specified.

`Justify`

- The `Justify` attribute specifies horizontal alignment of text in the cell. For `Left`, textlines are aligned along the left margin and ragged on the right. For `Right`, textlines are aligned along the right margin and ragged on the left. For `Center`, textlines are ragged on both margins and aligned along the center of the element. The `Char` option aligns text— usually numbers— with two characters in each line to the right of the character specified by the `CharAlign` attribute, and the rest of the line to the left. The default value for the `Justify` attribute is `Left`. Note that CALS tables specify a value of "justify" (meaning both left- and right-aligned text)— this is not supported.

`SpanRows`

- The `SpanRows` attribute specifies the vertical span of the cell. The value of `SpanRows` must be a positive number. The default is 1.

`RowSep`

- The `RowSep` attribute specifies whether or not a horizontal rule (line) is to be displayed at the bottom edge of the cell. A value of 0 indicates false, any integer other than 0 indicates true.

`VJustify`

- The `VJustify` attribute specifies vertical positioning of cell content. The differences among the three settings are only noticeable for cells whose content does not fill the cell from top to bottom. For `Top`, the content is started at the top of the cell and may complete before the bottom of the cell. For `Bottom`, the content ends at the bottom of the cell; there may be unused space above the content. For `Middle`, the content is vertically centered in the cell. The default value for the `VJustify` attribute is `Top`.

The `Cell` feature can be used with the Row and Table features. If a single element implies the beginning of a table, row, and cell, all three features can be used.

The `Cell` feature is not inherited.

    <Path>TABLE
    </Path>
    <Online>
       <Cell  ColRef="column1"  SpanCols=1  SpanRows=1>
    </Online>
    <Print>
       <Cell  ColRef="column1"  SpanCols=1  SpanRows=1>
    </Print>

The following set of `Path` statements illustrates how a table might be specified in a style sheet. The example uses attribute references to assign values to the table-related features. These values would be specified in other elements in the document.

#### Table Example

    <Path>TABLE
    </Path>
    <Online>
       <Border display="@frame">
    </Online>

    <Path>TGROUP
    </Path>
    <Online>
       <Table Cols="@cols">
    </Online>

    <Path>COLSPEC
    </Path>
    <Online>
       <ColFormat Justify="@align" Name="@colname" Width="@colwidth">
    </Online>

    <Path>TBODY
    </Path>
    <Online>
       <Border
       display=all>
    </Online>

    <Path>ROW
    </Path>
    <Online>
       <Row>
    </Online>

    <Path>ENTRY
    </Path>
    <Online>
       <Cell  ColRef="@colname"  SpanCols="@nameend -  @namest + 1" SpanRows="@morerows + 1>
       <border display=all>
    </Online>

## Other Features

The style sheet features described in this section are Border, Ignore, and Prefix and Suffix.

### Border

The `Border` feature is used to draw rule lines at the outside edges of an element. Its syntax is:

    <Border
     Display = {bottom | left | right | top | all | horiz | vert }
     Thickness = [0-9]+>

The `Border` feature has the following attributes:

`Display`

- The `Display` attribute accepts the following values:

  `bottom`

- Specifies a rule line below the element.

`left`

- Specifies a rule line to the left of the element.

`right`

- Specifies a rule line to the right of the element.

`top`

- Specifies a rule line above the element.

`all`

- This compound value specifies rule lines above, below, and to the right and left of the element.

`horiz`

- This compound value specifies rule lines above and below the element.

`vert`

- This compound value specifies rule lines to the left and right of the element.

`Thickness`

- Specifies the line weight of the border in points. The value of `Thickness` must be a positive number.

The `Border` feature is not inherited.

This example `Path` statement displays a 2-point border around the LINK element.

    <Path>
    LINK</Path>
    <Online>
       <Border  Display=all  Thickness=2>
    </Online>
    <Print>
       <Border  Display=al  Thickness=2>
    </Print>

### Ignore

`Ignore` specifies whether the contents of the element are to be displayed or printed. Its syntax is:

    <Ignore
    >

This example `Path` statement specifies that text delimited by the VERSION element will not be displayed or printed.

    <Path>VERSION
    </Path>
    <Online>
       <Ignore>
    </Online>
    <Print>
       <Ignore>
    </Print>

The `DTINFO.Ignore` architectural form prevents an element and its contents from being placed in the full-text index and document database. The Ignore feature also prevents the content from being rendered. For more information, see Understanding Architectural Forms.

### Prefix and Suffix

The `Prefix` and `Suffix` features add constant text before and after the content of an element. Each instance of a `Prefix` or `Suffix` feature must include one `Content` subfeature and any number of additional `allowed` features.

    <Prefix>
     <Content>
     {#PCDATA | Auto}+ </content>
     allowed features
    </Prefix>
    <Suffix>
     <Content>
     {#PCDATA | Auto}+ </content>
     allowed features
    </Suffix>

`Prefix` and `Suffix` features are not inherited.

#### Content Subfeature and Allowed Features for Prefix and Suffix

The `Content` subfeature can contain any combination of text or system-generated number tokens.

To specify a system-generated number token, use the `Auto` subfeature, which has one required attribute— `ID`. The `ID` in this case is the name of the number token specified with the `AutoNumber` feature. Use both start and end tags when using the `Content` subfeature.

You can specify the following allowed features in a `Prefix` or `Suffix` feature.

- Font

- HighLight

- Layout

- LineBreak

- Position

This example shows a `Prefix` and `Suffix` for the CAUTION element:

    <Path>CAUTION
    <Path/>
    <Online>
       <Prefix>
       <Content>CAUTION:
       </Content>
       <Font Weight=bold size=14>
       <Layout LIndent=6 ASpace=6>
       <Linebreak both>
       <Highlight Underline=true>
       </Prefix>
    </Online>
    <Print>
       <Prefix>
       <Content>CAUTION:
       </Content>
       <Font Weight=bold size=14>
       <Layout LIndent=6 ASpace=6>
       <Linebreak both>
       <Highlight Underline=true>
       </Prefix>
    </Print>

    <Path>CAUTION<Path/>
    <Online>
       <Suffix><Content>CAUTION:
       </Content>
       <Font Weight=bold size=14>
       <Layout LIndent=6 ASpace=6>
       <Linebreak both>
       <Highlight Underline=true>
       </Suffix>
    </Online>
    <Print>
       <Suffix>
       <Content>WARRANTY ALERT
       </Content>
       <Font Weight=bold Size=14>
       <Layout LIndent=6 ASpace=6>
       <Linebreak both>
       <Highlight Underline=true>
       </SUFFIX>
    </Print>