Glossary Item Box

TechWriter 2009 for Databases Send comments on this topic.

Using XHTML/HTML Comments

The XHTML/HTML comment model is based on the XHTML and HTML markup standards defined by W3C.  While originally developed for create web pages, TechWriter extends the use of XHTML/HTML for commenting databases

If you are using or plan to use XHTML or HTML for your database comments, you must set the comment format to XHTML/HTML on the Database Settings dialog.  

The XHTML comment model includes support for the following tags that can be used for formatting. 

HTML Tag Description
<B> or <STRONG> or <CODE> Changes the font to bold.
<I> or <EM> Changes the font to italic.
<SUP> Changes the text to a superscript
<SUB> Changes the text to a subscript
<OL> and <LI>

Formats a numbered list.   The type attribute can also be specified to control the numbering scheme for the list as follows:

  • A - Uppercase alphabetic (ie. A, B, C)
  • a - Lowercase alphabetic (ie. a, b, c)
  • I - Uppercase Roman numerals (ie. I, II, III)
  • i - Lowercase Roman numerals (ie. i, ii, iii)
  • 1 - Arabic numerals (ie. 1, 2, 3)
<UL> and <LI> Formats a bulleted list.
<A HREF='...'> Represents a link.  See Creating Topic Links for more information.
<DL class='params'>, <DT> and <DD> Represents a list of names and descriptions of stored procedure parameters.
<DL class='columns'>, <DT> and <DD> Represents a list of names and descriptions of database columns.
<DIV class='returns'> Represents the description of the value returned by a function.
<DIV class='othertitle'> Formats the text as a document title
<H1>,<H2>,<H3> and <H4> Formats the text as a heading
<BLOCKQUOTE> Indents the text
<P> Starts a new paragraph and separates the description from the remarks section of the comments.
<PRE> Starts a block of pre-formatted text used for code listings.
<BR> Inserts a line break
<IMG SRC='...'>

References an image.  The style attribute can also be specified that includes one or more of the following CSS attributes:

  • height
  • width
  • text-align

See Referencing Images for more information. 

<TABLE>, <COL>, <THEAD>, <TBODY>, <TR>, <TH> and <TD> Used to create a table.  See "Using Table Tags" below for an example.


Horizontal Alignment

The style attribute that contains a definition for the CSS text-align property can be used to specify specify horizontal alignment for the following tags:

Example

Below is an example of a comment that uses XHTML:

 
<p>
Table for storing employee information.
</p>
<p>
This table contains information related to an employee. 
</p>
<dl class="columns">
  <dt>EmployeeID</dt><dd>ID of the employee.</dd>
  <dt>FirstName</dt><dd>First name of the employee.</dd>
  <dt>LastName</dt><dd>Last name of the employee.</dd>
  <dt>ManagerID</dt><dd>ID of the employee's <a href="Tables.CorpDb#Manager">manager</a></dd>
</dl>


In the above example, the <p> tag separates the text that represents the description from the text that represents the remarks.

Using Table Tags

Below is an example of a table created using XHTML tags:

 

<table>
  <col width="25%"/>
  <col width="75%"/>
  <thead>
    <tr><th>Role</th><th>Description</th></tr>
  <thead>
  <tbody>
     <tr><td>User</td><td>Typical end-user</td></tr>
     <tr><td>Admin</td><td>System administrator</td></tr>
     <tr><td>Manager</td><td>Project manager</td></tr>
  </tbody>
</table>

Encoded XHTML/HTML

If you have already embedded XHTML/HTML tags within your comments, but have done so by encoding the tags, you will want to select the XHTML/HTML (encoded) model.  For example, if you have encoded your paragraph tag as &lt;P> instead of <P>, this alternative to the standard XHTML/HTML model will decode your encoded tags replacing the character entities such as the less than sign so that the tags can be properly parsed.


 

 

 


© 2005-2009 Adivo Ltd. All rights reserved.