Sample text from Henry Fielding's Tom Jones

Here's a short excerpt from a great 18th Century British novel. Enjoy!

Book I. Containing as Much of the Birth of the Foundling as Is Necessary or Proper to Acquaint the Reader with in the Beginning of This History

Chapter VII. Containing Such Grave Matter, That the Reader Cannot Laugh Once Through the Whole Chapter, Unless Peradventure He Should Laugh at the Author

WHEN Jenny appeared, Mr. Allworthy took her into his study, and spoke to her as follows: "You know, child, it is in my power as a magistrate, to punish you very rigorously for what you have done; and you will, perhaps, be the more apt to fear I should execute that power, because you have in a manner laid your sins at my door.

"But, perhaps, this is one reason which hath determined me to act in a milder manner with you: for, as no private resentment should ever influence a magistrate, I will be so far from considering your having deposited the infant in my house as an aggravation of your offence, that I will suppose, in your favour, this to have proceeded from a natural affection to your child, since you might have some hopes to see it thus better provided for than was in the power of yourself, or its wicked father, to provide for it. I should indeed have been highly offended with you had you exposed the little wretch in the manner of some inhuman mothers, who seem no less to have abandoned their humanity, than to have parted with their chastity. It is the other part of your offence, therefore, upon which I intend to admonish you, I mean the violation of your chastity; -- a crime, however lightly it may be treated by debauched persons, very heinous in itself, and very dreadful in its consequences....

Sample text to illustrate HTML elements

Here are some HTML elements that should put FOP through its paces.

Basic HTML formatting

Now is the time for all good men and women to come to the aid of the party. The quick brown fox jumped over the lazy dog. Every good boy deserves fudge. Jackdaws love like my big sphinx of quartz.

Lists

The previous section featured a number of text effects:

Here they are again, ranked according to how I like 'em:

  1. Underlined text
  2. Strikethrough text
  3. Italicized text
  4. Bold text
  5. Teletype text
  6. Emphasized text
  7. Strongly emphasized text

Finally, let's define these things in a definition list, just to have something else to write about.

Bold
Text written in a thicker font.
Emphasized
Emphasized text, usually written in an italicized font.
Italic
Text written in an italicized font.
Strikethrough
Text with a line drawn through it.
Strong
Strongly emphasized text, usually written in a bold font.
Teletype
Text written in a monospaced font.
Underlined
Text with a line drawn under it.
Here's a second definition of the term, just to test the stylesheet. The second and any subsequent definitions under the same term should appear a half-line below the previous definition.

This lovely document was produced by the Apache XML Project's FOP:

More lists

Here are some advanced lists. This one uses uppercase Roman numerals:

  1. Underlined text
  2. Strikethrough text
  3. Italicized text
  4. Bold text
  5. Teletype text
  6. Emphasized text
  7. Strongly emphasized text

This list uses lowercase Roman numerals starting at 17:

  1. Underlined text
  2. Strikethrough text
  3. Italicized text
  4. Bold text
  5. Teletype text
  6. Emphasized text
  7. Strongly emphasized text

This one uses lowercase alpha characters and starts at 30:

  1. Underlined text
  2. Strikethrough text
  3. Italicized text
  4. Bold text
  5. Teletype text
  6. Emphasized text
  7. Strongly emphasized text

This list uses uppercase alpha characters and starts at 12:

  1. Underlined text
  2. Strikethrough text
  3. Italicized text
  4. Bold text
  5. Teletype text and a sublist:
    1. An item
    2. Another item
    3. Yet another item
    4. Notice that these items (and in fact this whole list) are indented from the start of the other list items. Notice also that the text wraps the way you'd think it would, using the settings of the internal list, not the external list.
    5. Our final item
  6. Emphasized text

Tables

Mapping HTML table tags to XSL-FO tables has some difficulties. The biggest problems are supporting the cols attribute of the <table> element, and supporting the rowspan and colspan attributes of the <td> element. Here's a table that illustrates all of the things we support:

State Abbr
North Carolina NC
California CA
Tennessee TN
Texas
and
Connecticut
TX
CT
That's all!

More HTML we support

This section goes through more HTML tags we support.

Anchor tags

Supporting links is very important to us here at developerWorks. This sample document contains both internal and external links; if you don't believe me, just read the excerpt from Tom Jones earlier in this document.

This is not my address:

Mrs. Mary McGoon
901 Main Street
Kenosha, WI 38492

Now for a paragraph with boldfaced text, big text, bigger text, biggest text, and
three
line
breaks.

When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.
This text is big and centered
so it will stand out.

An <h1>

Blah blah blah

An <h2>

Blah blah blah

An <h3>

Blah blah blah

An <h4>

Blah blah blah

An <h5>

Blah blah blah

An <h6>

Blah blah blah

Here's some text that's before the <nobr> tag. Now here's a really, really, really long sentence that's coded with the <nobr> tag. This should run on and on and on and on and eventually it should run all the way off the page and into the void. This text appears after the <nobr> tag.

A short code listing

Here's a simple Java program, formatted with the <pre> element:

public class Sample
{
  public static void main(String [] args)
  {
    System.out.println("Hello, World!");

    for (int i = 0; i < 5; i++)
    {
      System.out.print("How");
      System.out.print("dy! ");
    }

    System.out.println();
  }
}
    

More HTML elements

This paragraph tests out the sample element (<samp>), small text (<small>), subscript text, superscript text, a keyboard command, and a variable name.