public class XHTMLWhitespaceXMLFilter extends DefaultXMLFilter
text(sp)(sp)text
becomes text(sp)text
SAX_LEXICAL_HANDLER_PROPERTY
Constructor and Description |
---|
XHTMLWhitespaceXMLFilter() |
XHTMLWhitespaceXMLFilter(XMLReader reader) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
protected void |
cleanContentExtraWhiteSpaces()
UC3: Replace group of white spaces by a single space.
|
void |
comment(char[] ch,
int start,
int length) |
void |
endCDATA() |
void |
endDocument() |
void |
endElement(String uri,
String localName,
String qName) |
protected void |
endEmptyVisibleElement() |
protected void |
endNonVisibleElement()
Flush previous content and print current one.
|
protected void |
flushContent()
Flush previous content and print current one.
|
protected void |
flushContent(boolean trimTrailing)
Flush previous content and print current one.
|
protected StringBuffer |
getContent() |
protected boolean |
isSemanticComment(String comment)
We remove spaces around non semantic comments.
|
protected void |
sendCharacters(char[] ch) |
protected void |
sendCharacters(char[] ch,
int start,
int length) |
protected void |
sendPreviousContent(boolean trimTrailing) |
protected boolean |
shouldRemoveWhiteSpaces() |
void |
startCDATA() |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
protected void |
startEmptyVisibleElement() |
protected void |
startNonVisibleElement()
Append an non visible element.
|
protected void |
trimLeadingWhiteSpaces() |
protected String |
trimLeadingWhiteSpaces(CharSequence content) |
protected void |
trimTrailingWhiteSpaces() |
protected String |
trimTrailingWhiteSpaces(CharSequence content) |
endDTD, endEntity, getProperty, parse, setProperty, startDTD, startEntity
endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public XHTMLWhitespaceXMLFilter()
public XHTMLWhitespaceXMLFilter(XMLReader reader)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class XMLFilterImpl
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class XMLFilterImpl
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class XMLFilterImpl
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
startCDATA
in class DefaultXMLFilter
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
endCDATA
in class DefaultXMLFilter
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
comment
in class DefaultXMLFilter
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class XMLFilterImpl
SAXException
protected boolean shouldRemoveWhiteSpaces()
protected void sendPreviousContent(boolean trimTrailing) throws SAXException
SAXException
protected void flushContent() throws SAXException
SAXException
protected void flushContent(boolean trimTrailing) throws SAXException
SAXException
protected void startEmptyVisibleElement() throws SAXException
SAXException
protected void endEmptyVisibleElement() throws SAXException
SAXException
protected void startNonVisibleElement() throws SAXException
SAXException
protected void endNonVisibleElement() throws SAXException
SAXException
protected void sendCharacters(char[] ch) throws SAXException
SAXException
protected void sendCharacters(char[] ch, int start, int length) throws SAXException
SAXException
protected void cleanContentExtraWhiteSpaces()
protected void trimLeadingWhiteSpaces()
protected String trimLeadingWhiteSpaces(CharSequence content)
protected void trimTrailingWhiteSpaces()
protected String trimTrailingWhiteSpaces(CharSequence content)
protected StringBuffer getContent()
protected boolean isSemanticComment(String comment)
comment
- the comment to evaluateCopyright © 2004–2021 XWiki. All rights reserved.