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, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
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)
Setter for the field
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.
|
address_, address, anchor_, anchor, article_, article, author_, author, blockquote_, blockquote, body_, body, bold_, bold, close, comment, content_, content, data_, data, date_, date, definedTerm_, definedTerm, definition_, definition, definitionList_, definitionList, definitionListItem_, definitionListItem, division_, division, figure_, figure, figureCaption_, figureCaption, figureGraphics, flush, footer_, footer, head_, head, header_, header, horizontalRule, inline_, inline, italic_, italic, lineBreak, lineBreakOpportunity, link_, link, list_, list, listItem_, listItem, monospaced_, monospaced, navigation_, navigation, nonBreakingSpace, numberedList_, numberedList, numberedListItem_, numberedListItem, pageBreak, paragraph_, paragraph, rawText, section_, section, sectionTitle_, sectionTitle, sidebar_, sidebar, table_, table, tableCaption_, tableCaption, tableCell_, tableCell, tableHeaderCell_, tableHeaderCell, tableRow_, tableRow, tableRows_, tableRows, text, time_, time, title_, title, unknown, verbatim_, verbatim
address, anchor, article, author, blockquote, body, content, data, date, definedTerm, definition, definitionList, definitionListItem, division, figure, figureCaption, figureGraphics, footer, formatLocation, getDocumentLocator, getLocationLogPrefix, head, header, horizontalRule, init, inline, lineBreak, lineBreakOpportunity, link, list, listItem, navigation, numberedList, numberedListItem, paragraph, section1_, section1, section2_, section2, section3_, section3, section4_, section4, section5_, section5, section6_, section6, sectionTitle_, sectionTitle, sectionTitle1_, sectionTitle1, sectionTitle2_, sectionTitle2, sectionTitle3_, sectionTitle3, sectionTitle4_, sectionTitle4, sectionTitle5_, sectionTitle5, sectionTitle6_, sectionTitle6, setDocumentLocator, sidebar, table, tableCaption, tableCell, tableHeaderCell, tableRow, tableRows, text, time, title, unifyEOLs, verbatim
public AbstractXmlSink()
public void setInsertNewline(boolean insertNewline)
Setter for the field insertNewline
.
insertNewline
- a boolean.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)
Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.