JCite With Plain HTML Include Files

This document shows how JCite can include plain HTML fragment files into your main HTML files.

Citing An HTML Fragment

The following definition list is included from a separate HTML fragment file:

Test 1
24 = 3 * 8
18 = 3 * 6
Test 2
11 = 3 + 8
9 = 3 + 6

which was done using the following instruction in the source HTML document:

[inc:included.htm]

The fragment file looks like this:

<dl>
<dt>Test 1</dt><dd>24 = 3 * 8<br/>18 = 3 * 6</dd>
<dt>Test 2</dt><dd>11 = 3 + 8<br/>9 = 3 + 6</dd>
</dl>

Note in particular that it does not contain any <html> and <body> tags.

Why Does JCite Support Includes?

This feature exists within JCite to support the citing of tested material that you cannot easily cite directly from its source.

The case I encountered was when my tests ran through a complex Excel spreadsheet where the rows were structured into a series of named tests. I wanted to emit these row tests and their results into a highly customized format for presentation. So my test code now simply emits the tests and the results as an HTML fragment file. In the documentation source, I cite these fragment files using JCite. This ensures that the final documentation produced during a build always includes the latest test run results.

If I had included them using my normal macro preprocessor during the build of the documentation source file, the include would have been too early.