public abstract class AbstractXmlSink extends SinkAdapter implements XmlMarkup
Sink
for xml markup syntax.BANG, CDATA, DOCTYPE_START, ENTITY_START, XML_NAMESPACE
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NUMBERING_DECIMAL, NUMBERING_LOWER_ALPHA, NUMBERING_LOWER_ROMAN, NUMBERING_UPPER_ALPHA, NUMBERING_UPPER_ROMAN, ROLE, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5
Constructor and Description |
---|
AbstractXmlSink() |
Modifier and Type | Method and Description |
---|---|
String |
getNameSpace()
Return the default namespace that is prepended to all tags written by this sink.
|
void |
setInsertNewline(boolean insertNewline) |
void |
setNameSpace(String ns)
Sets the default namespace that is prepended to all tags written by this sink.
|
protected abstract void |
write(String text)
Write a text to the sink.
|
protected void |
writeEndTag(HTML.Tag t)
Ends a Tag without writing an EOL.
|
protected void |
writeEOL()
Writes a system EOL.
|
protected void |
writeSimpleTag(HTML.Tag t)
Starts a simple Tag.
|
protected void |
writeSimpleTag(HTML.Tag t,
MutableAttributeSet att)
Starts a simple Tag with attributes.
|
protected void |
writeStartTag(HTML.Tag t)
Starts a Tag.
|
protected void |
writeStartTag(HTML.Tag t,
MutableAttributeSet att)
Starts a Tag with attributes.
|
protected void |
writeStartTag(HTML.Tag t,
MutableAttributeSet att,
boolean isSimpleTag)
Starts a Tag with attributes.
|
anchor_, anchor, anchor, author_, author, author, body_, body, body, bold_, bold, close, comment, date_, date, date, definedTerm_, definedTerm, definedTerm, definition_, definition, definition, definitionList_, definitionList, definitionList, definitionListItem_, definitionListItem, definitionListItem, figure_, figure, figure, figureCaption_, figureCaption, figureCaption, figureGraphics, figureGraphics, flush, head_, head, head, horizontalRule, horizontalRule, italic_, italic, lineBreak, lineBreak, link_, link, link, list_, list, list, listItem_, listItem, listItem, monospaced_, monospaced, nonBreakingSpace, numberedList_, numberedList, numberedList, numberedListItem_, numberedListItem, numberedListItem, pageBreak, paragraph_, paragraph, paragraph, rawText, section_, section, section1_, section1, section2_, section2, section3_, section3, section4_, section4, section5_, section5, sectionTitle_, sectionTitle_, sectionTitle, sectionTitle, sectionTitle1_, sectionTitle1, sectionTitle2_, sectionTitle2, sectionTitle3_, sectionTitle3, sectionTitle4_, sectionTitle4, sectionTitle5_, sectionTitle5, table_, table, table, tableCaption_, tableCaption, tableCaption, tableCell_, tableCell, tableCell, tableCell, tableHeaderCell_, tableHeaderCell, tableHeaderCell, tableHeaderCell, tableRow_, tableRow, tableRow, tableRows_, tableRows, text, text, title_, title, title, unknown, verbatim_, verbatim, verbatim
enableLogging, getLog, init, unifyEOLs
public void setInsertNewline(boolean insertNewline)
public void setNameSpace(String ns)
ns
- the default namespace.public String getNameSpace()
protected void writeStartTag(HTML.Tag t)
<tag>
t
- a non null tagwriteStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
protected void writeStartTag(HTML.Tag t, MutableAttributeSet att)
<tag attName="attValue">
t
- a non null tag.att
- a set of attributes. May be null.writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean).
protected void writeStartTag(HTML.Tag t, MutableAttributeSet att, boolean isSimpleTag)
<tag attName="attValue">
t
- a non null tag.att
- a set of attributes. May be null.isSimpleTag
- boolean to write as a simple tag.protected void writeEOL()
protected void writeEndTag(HTML.Tag t)
</tag>.
t
- a tag.protected void writeSimpleTag(HTML.Tag t)
<tag />
t
- a non null tagwriteSimpleTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
protected void writeSimpleTag(HTML.Tag t, MutableAttributeSet att)
<tag attName="attValue" />
t
- a non null tag.att
- a set of attributes. May be null.writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean).
protected abstract void write(String text)
text
- the given text to writeCopyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.