Package cox.jmatt.java.MathTools.markup.html

This package provides classes to generate (X)HTML markup.

See:
          Description

Class Summary
AnchorTag This class provides the anchor ('<a>') tag.
BaseHTag This is the abstract superclass for all HTML tag classes.
BQTag This class provides the <blockquote> tag.
BTag This class provides the <b> tag.
ContainerTag This is the abstract superclass of tag classes meant to contain other tags.
DDTag This class provides the <dd> tag.
DivTag This class implements the <div> tag, the major block-level structural document tag.
DLTag This class provides the definition list tag and container for definition elements: <dl>, <dt> and <dd>.
DTTag This class provides the <dl> tag.
EMTag This class provides the <em> tag.
HnTag These are heading tags: <h1> to <h6>.
HRTag This class provides the <hr> tag.
HTMLTag This class represents the HTML document itself.
IMGTag This class provides the <img> tag.
ITag This class provides the <i> tag.
ListTag This class provides the <ul> and <ol> tags.
LITag This class provides the <li> tag.
MathGenHTML This class is to the HTML package what MathDrawSVG is to the SVG package.
PTag This class implements the <p> tag, the paragraph block.
SimpleDecorationTag This abstract class provides tags used for simple text decoration plus several others that are similarly straightforward.
SpanTag This class provides the <span> tag.
TableTag This class provides the <table> tag.
TDTag This class provides the <td> and <th> tags.
TRTag This class represents a single row ('<tr>' ...
UTag This class provides the <u> tag.
 

Enum Summary
BaseHTag.TagKeys This enum holds information and default values for the various tag classes, all of which subclass BaseHTag.
 

Package cox.jmatt.java.MathTools.markup.html Description

This package provides classes to generate (X)HTML markup. The implementation is minimal and only covers HTML tags most common in presentation and formatting, not form or web-app generation. It is primarily geared toward generating static HTML documents although nothing prevents its use from MTApplet for dynamic content.

The tag hierarchy is much looser than that of the SVG package. HTML tag structures are much more flexible and can be intertwined more so than SVG so more responsibility is placed on the user for proper nesting and construction.

HTML, Strict HTML, and XHTML

The MathTools.markup.html.* package can generate all three! By design the tag classes use the loosest possible structure to allow the maximum flexibility when generating HTML markup. This means it is both possible and not difficult to generate documents that will not validate correctly under 'Strict' DTDs or 'X' convention, even though all tags will be properly formed and closed. Attributes are also properly quoted and assigned so values are always present.

The responsibility, then, of proper X- or Strict HTML falls upon the shoulders of the user! For XHTML do not use tag classes not permitted there. For Strict-DTD HTML do not use 'bad' structuring. For 'loose' HTML documents use whatever whenever.

HTML Documents

The javadoc for this package (and others) often uses the term HTML Document, which may refer to a web page but might not. As has been stated previously (and frequently!) MathTools is designed as a single-user desktop application and not for server-side use. While it does have 'web-ish' capabilities MathTools is NOT a web-app! So why bother with HTML and MTApplet? The answer lies in MathTools' definition of HTML documents.

All web pages are HTML documents but not all HTML documents are web pages! HTML is a common open format, both extensible and well-defined. Any web browser available can load HTML from a hard drive, USB drive, network drive (not server), CD or even floppy disk. This makes HTML an excellent choice for truly universal formatting.

The Firefox browser understands (and can render) both SVG and MathML natively: no unnatural contortions required! This makes it an ideal platform for generating math tests if OpenOffice is not available or not desired. To generate a test, use HTML with MathML and SVG as required. Including graphs in image format needs only an IMGTag to render and display properly. Then, when the HTML document is complete, load it into a browser and print it!

HTML, especially that which does not require 'X-' or Strict DTD validation, is extremely easy to generate and manipulate. This again makes HTML a prime choice for generating test documents. Finally, even though MathTools is not ideal for server-side use, it can operate on the client side quite readily.

So. Use HTML as needed, these classes are designed to simply the process of HTML Document generation, whether for web pages or something else.