Learn How Clauses and Clause Libraries Work

From HotDocs Wiki

Jump to: navigation, search

A clause is a HotDocs component that contains a section of a document, including text and possibly some HotDocs variables. Clauses may be:

  • Inserted directly into the document using the INSERT instruction.
  • Placed in a clause library, where they can be selected for insertion in either a new or an existing document.

When clauses were originally implemented in HotDocs, clauses were associated with only the teplate in which they were inserted. There were no clause libraries-only individual clauses-which were inserted using INSERT or INSERT IF instructions. The clauses were maintained through the Clause component editor. This option is still used in HotDocs now.

A clause is a HotDocs component that contains a section of a document, including text and possibly some HotDocs variables. Clauses may be:

  • Inserted directly into the document using the INSERT instruction.
  • Placed in a clause library, where they can be selected for insertion in either a new or an existing document.

When clauses were originally implemented in HotDocs, clauses were associated with only the template in which they were inserted. There were no clause libraries—only individual clauses—which were inserted using the INSERT or INSERT IF instruction. The clauses were maintained through the Clause component editor. This option is still used in HotDocs now.

Clause Libraries

The idea of inserting clauses expanded with the creation of the clause library, which allows the user to choose any number of clauses to be inserted at one specific point in the document. The clause library allows the developer to put the clauses in the order and hierarchy they should take on when shown at the Select Clauses to Insert dialog. These clauses and clause libraries are still tied to a given template, but instead of using an instruction such as «INSERT Clause Name», you insert the clause library file (for example, «INSERT "Clauses.hdl"»).

Finally, clauses evolved into the notion that a clause library doesn't necessarily need to be associated with any specific template. Instead it can be used as a storage file—a place to store clauses that can be inserted in any number of documents. This was accomplished by allowing the clause library to be added to a regular HotDocs library.

Clause libraries use four types of files, as shown in the following table:

These files work simultaneously to organize and store clauses. The library file, clause file, and clause component file are all located in the same folder as other HotDocs templates. The library, clause, and component files for one clause library have the same file name. The clauses are regular HotDocs template files that, when in use (either being edited or assembled), are unzipped and placed in a temporary folder on your computer. Then, when the clause library is no longer in use, the clauses are zipped and placed back in the clause file, and the temporary folder is deleted.

During the assembly process, the user sees a list of the available clauses in the library file. Clauses can be selected and organized in the desired order for the document. HotDocs will place a copy of each selected clause in the document and proceed to prompt the user for any variables contained in the clauses.

Clause Libraries Containing Individual Templates

Since the clause (.HCL) file is just a collection of HotDocs templates stored in a compressed format, it is possible to have a clause library made up of template files instead of clause files. The advantage is that each of the "clauses" is now stored in an individual template file that can be directly inserted into a central document (where they may always be needed), but the templates can also be used for free form drafting when needed. Additionally, each of the templates may use a separate component file instead of sharing the component file that matches the name of the library. To make this work, there are a few things that must be done:

  • The .HDL file listing the clauses must exist in the same folder as the clauses.
  • The .HDL file needs a.CMP file (this file does not need to have any components in it, although it is perfectly acceptable to have components in it or even have all the templates point to this as a "master" component file).
  • The items in the .HDL library should have full file paths, or no paths at all, so that when drafted, they can be found.

For example, you can use this method for drafting contracts. First, you would put all of the contract clauses into HotDocs templates. (Note that you would not create a clause library yet, but create small templates for each clause adding them the same way that templates are normally created.) By putting each contractual clause into a separate template, you can then create standard contract templates that insert specific clauses into the main template. The standard contracts could then be used "as is" for standard deals. Finally, for non-standard contracts (or for modifying the standard contracts after negotiating), all the templates could then be used as a clause library. Don't forget that the library into which the contractual clauses were added must be moved into the same folder as all of the contractual clause templates.