This package provides facilities for implementing little HTML-like markup languages that extend HTML. See {@link com.arsdigita.templating.html.HTMLParser} and {@link com.arsdigita.templating.html.demo} for concrete examples.

Conceptually, the package revolves around two interfaces: {@link com.arsdigita.templating.html.HTMLParser} and {@link com.arsdigita.templating.html.ContentHandler}. An {@link com.arsdigita.templating.html.HTMLParser html parser} can read HTML text and dispatch events to the {@link com.arsdigita.templating.html.ContentHandler content handler}. The content handler may then process custom tags in a useful manner.

At this time, the package only provides a single implementation of the {@link com.arsdigita.templating.html.HTMLParser} interface, namely, the {@link com.arsdigita.templating.html.XHTMLParser} class that relies on a SAX parser to perform the actual parsing.

One example implementation of the {@link com.arsdigita.templating.html.ContentHandler} is provided by {@link com.arsdigita.templating.html.demo.DemoTagHandler}.

Another possible implementation of the {@link com.arsdigita.templating.html.ContentHandler} interface would be a class that "understands" custom "link" tags of the following form:

<p>As we mentioned in our <link cms_id="23889">previous article</link>,
serious Java practitioner tend to shun the
<a href="http://www.google.com/search?q=double-checked+locking">Double-Checked
Locking</a> pattern...
    

where the <link> tag may be used to link one CMS article to another.