nu.validator.messages
Class XhtmlSourceHandler

java.lang.Object
  extended by nu.validator.messages.XhtmlSourceHandler
All Implemented Interfaces:
SourceHandler

public class XhtmlSourceHandler
extends Object
implements SourceHandler


Field Summary
private  AttributesImpl attrs
           
private  boolean charOpen
           
private  XhtmlSaxEmitter emitter
           
private static AttributesImpl LINE_BREAK_ATTRS
           
private  boolean lineHadCharacters
           
private  int lineNumber
           
private  boolean lineOpen
           
private  boolean listOpen
           
private static char[] NEWLINE_SUBSTITUTE
           
private  SortedSet<Integer> oneBasedLineErrors
           
private  String rangeOpen
           
 
Constructor Summary
XhtmlSourceHandler(XhtmlSaxEmitter emitter)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endCharHilite()
           
 void endRange()
           
 void endSource()
           
private  void maybeOpen()
           
 void newLine()
           
 void setLineErrors(SortedSet<Integer> oneBasedLineErrors)
           
 void startCharHilite(int oneBasedLine, int oneBasedColumn)
           
 void startRange(int oneBasedLine, int oneBasedColumn)
           
 void startSource(String type, String encoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEWLINE_SUBSTITUTE

private static final char[] NEWLINE_SUBSTITUTE

LINE_BREAK_ATTRS

private static final AttributesImpl LINE_BREAK_ATTRS

attrs

private final AttributesImpl attrs

emitter

private final XhtmlSaxEmitter emitter

listOpen

private boolean listOpen

lineOpen

private boolean lineOpen

rangeOpen

private String rangeOpen

charOpen

private boolean charOpen

lineNumber

private int lineNumber

lineHadCharacters

private boolean lineHadCharacters

oneBasedLineErrors

private SortedSet<Integer> oneBasedLineErrors
Constructor Detail

XhtmlSourceHandler

public XhtmlSourceHandler(XhtmlSaxEmitter emitter)
Parameters:
emitter -
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface SourceHandler
Throws:
SAXException

maybeOpen

private void maybeOpen()
                throws SAXException
Throws:
SAXException

endCharHilite

public void endCharHilite()
                   throws SAXException
Specified by:
endCharHilite in interface SourceHandler
Throws:
SAXException

endRange

public void endRange()
              throws SAXException
Specified by:
endRange in interface SourceHandler
Throws:
SAXException

endSource

public void endSource()
               throws SAXException
Specified by:
endSource in interface SourceHandler
Throws:
SAXException

newLine

public void newLine()
             throws SAXException
Specified by:
newLine in interface SourceHandler
Throws:
SAXException

startCharHilite

public void startCharHilite(int oneBasedLine,
                            int oneBasedColumn)
                     throws SAXException
Specified by:
startCharHilite in interface SourceHandler
Throws:
SAXException

startRange

public void startRange(int oneBasedLine,
                       int oneBasedColumn)
                throws SAXException
Specified by:
startRange in interface SourceHandler
Throws:
SAXException

startSource

public void startSource(String type,
                        String encoding)
                 throws SAXException
Specified by:
startSource in interface SourceHandler
Throws:
SAXException

setLineErrors

public void setLineErrors(SortedSet<Integer> oneBasedLineErrors)
                   throws SAXException
Specified by:
setLineErrors in interface SourceHandler
Throws:
SAXException