org.ditchnet.xml
Interface Xml

All Known Implementing Classes:
Xhtml

public interface Xml

Some of the JspResponseWriter class' public instance methods write markup (XML, specifically) to the response stream. The Xml interface, it's static inner interfaces Tag and Attr enforce type-safety and decrease the likelyhood of malformed XML (which is not truely XML anyway) being generated by the JspResponseWriter class.

For example the JspResponseWriter's startElement() method accepts one parameter of type Xml.Tag instead of just a String. Again, this ensures type safety, but more importantly, allows a fixed set of markup elements to be sent to the response stream making XML well-formedness errors much less likely.

This class is purely a utilitly class, and may not be instaciated by client code (private constructor).

Note that the Xml.Tag class implements the Type-Safe Enum Pattern as described by Joshua Bloch in Effective Java.

Subclasses of this class should represent a specific XML vocabulary or application. For example, the Xhtml class represents the XHTML vocabulary.

Author:
Todd Ditchendorf

Nested Class Summary
static interface Xml.Attr
          Concrete implementations of this interface should impelement the Type-Safe Enum pattern as outlined by Joshua Bloch in Effective Java and provide static member variables that present the complete set of attribute names available in the XML vocabulary in question.
static interface Xml.Tag
          This class implements the Type-Safe Enum pattern as outlined by Joshua Bloch in Effective Java.