|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.render.AbstractRenderer
org.millscript.millscript.render.HTMLRenderer
public final class HTMLRenderer
This class implements MillScripts HTML renderer. It renders to the HTML 4 specification, but may not render valid HTML 4.
The renderers ability to render valid HTML depends on the input it's provided, e.g. supported tags. The main issue with the renderer is that database content can contain HTML tags, as a result we cannot automatically encode "<" characters that occur in string content. When we can parse database content into strings, XmlElement, etc, our ability to render valid documents will greatly improve.
| Field Summary |
|---|
| Fields inherited from class org.millscript.millscript.render.AbstractRenderer |
|---|
availableEntities, config, outputCharset, outputEncoder, outputVFile, outputWriter |
| Constructor Summary | |
|---|---|
HTMLRenderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
Constructs a new HTML renderer, to render to the specified virtual file using the given confguration. |
|
| Method Summary | |
|---|---|
void |
append(char ch)
Appends the specified character, allowing the character to be escaped as appropriate for this renderer. |
void |
appendEscapeFor(char ch)
Appends the escape sequence for the specified character. |
void |
appendNoEscape(char ch)
Appends the specified character, without using an escape sequence. |
void |
renderDocumentFooter()
Renders the required document footer for this renderer. |
void |
renderDocumentHeader()
Renders the required document header for this renderer. |
void |
renderObject(java.lang.Object o)
Renders the specified object using this renderer. |
void |
renderURI(java.lang.Object x)
Renders an object as a URI. |
void |
renderXMLElement(XmlElement x)
Renders the specified XML element using this renderer. |
| Methods inherited from class org.millscript.millscript.render.AbstractRenderer |
|---|
append, appendNoEscape, canEncode, render, renderAsDocument, renderAsFragment, renderCDATA, renderXMLComment |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLRenderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
conf - the configuration to get rendering parameters fromfile - the virtual output file| Method Detail |
|---|
public void append(char ch)
throws java.io.IOException
Renderer
ch - the character to append, allowing it to be escaped
java.io.IOException - thrown if an IO problem occursRenderer.append(char)
public void appendEscapeFor(char ch)
throws java.io.IOException
Renderer
ch - the character to append an escape sequence for
java.io.IOException - thrown if an IO problem occursRenderer.appendEscapeFor(char)
public void appendNoEscape(char ch)
throws java.io.IOException
Renderer
ch - the character to append, without using an escape sequence.
java.io.IOException - thrown if an IO problem occursRenderer.appendNoEscape(char)
public void renderDocumentFooter()
throws java.io.IOException
Renderer
java.io.IOException - thrown if an IO problem occursRenderer.renderDocumentFooter()
public void renderDocumentHeader()
throws java.io.IOException
Renderer
java.io.IOException - thrown if an IO problem occursRenderer.renderDocumentHeader()
public void renderObject(java.lang.Object o)
throws java.io.IOException
Renderer
o - the object to render
java.io.IOException - thrown if an IO problem occursRenderer.renderObject(java.lang.Object)
public void renderURI(java.lang.Object x)
throws java.io.IOException
x - the object to render
java.io.IOException
public void renderXMLElement(XmlElement x)
throws java.io.IOException
Renderer
x - the XML element to render
java.io.IOException - thrown if an IO problem occursRenderer.renderXMLElement(org.millscript.millscript.datatypes.XmlElement)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||