|
||||||||||
| 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.XML10Renderer
public class XML10Renderer
This class implements MillScripts XML renderer. It renders to the XML 1.0 specification, but may not always render valid XML 1.0.
The renderers ability to render valid XML depends on the input it's provided, e.g. supported tags. The main issue with the renderer is that database content can contain XML 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 | |
|---|---|
XML10Renderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
Constructs a new XML 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. |
java.lang.String |
getUniquePrefix(org.millscript.commons.xml.api.Name tagName)
Returns a new unique prefix based on the specified elements. |
void |
renderCDATA(CDATA c)
Renders the specified CDATA object using this renderer. |
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 |
renderXMLElement(XmlElement x)
Renders the specified XML element using this renderer. |
void |
renderXMLElementAttributeValue(org.millscript.commons.xml.api.Name name,
java.lang.String value)
|
| Methods inherited from class org.millscript.millscript.render.AbstractRenderer |
|---|
append, appendNoEscape, canEncode, render, renderAsDocument, renderAsFragment, renderXMLComment |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XML10Renderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
conf - the configuration to get rendering parameters fromfile - the virtual output file| Method Detail |
|---|
public final 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 final 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 final 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 final void renderCDATA(CDATA c)
throws java.io.IOException
Renderer
renderCDATA in interface RendererrenderCDATA in class AbstractRendererc - the CDATA object to render
java.io.IOException - thrown if an IO problem occursRenderer.renderCDATA(org.millscript.millscript.datatypes.CDATA)
public final void renderDocumentFooter()
throws java.io.IOException
Renderer
java.io.IOException - thrown if an IO problem occursRenderer.renderDocumentFooter()
public final void renderDocumentHeader()
throws java.io.IOException
Renderer
java.io.IOException - thrown if an IO problem occursRenderer.renderDocumentHeader()
public final 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 final 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)
public void renderXMLElementAttributeValue(org.millscript.commons.xml.api.Name name,
java.lang.String value)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getUniquePrefix(org.millscript.commons.xml.api.Name tagName)
xmlns attribute must be written.
tagName - the element to declare a new unique prefix/namespace
for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||