nu.validator.messages
Class XhtmlMessageEmitter

java.lang.Object
  extended by nu.validator.messages.MessageEmitter
      extended by nu.validator.messages.XhtmlMessageEmitter

public class XhtmlMessageEmitter
extends MessageEmitter

Version:
$Id: XhtmlMessageEmitter.java 54 2007-09-20 15:37:38Z hsivonen $
Author:
hsivonen

Field Summary
private static char[] AT_LINE
           
private  AttributesImpl attrs
           
private static char[] COLON_SPACE
           
private static char[] COLUMN
           
private  ContentHandler contentHandler
           
private  XhtmlSaxEmitter emitter
           
private  boolean exact
           
private  XhtmlExtractHandler extractHandler
           
private static char[] FROM_LINE
           
private static char[] IN_RESOURCE
           
private  boolean listOpen
           
private  XhtmlMessageTextHandler messageTextHandler
           
private static char[] ON_LINE
           
private  int oneBasedFirstColumn
           
private  int oneBasedFirstLine
           
private  int oneBasedLastColumn
           
private  int oneBasedLastLine
           
private static char[] PERIOD
           
private  String systemId
           
private  boolean textEmitted
           
private static char[] TO_LINE
           
private  boolean willShowSource
           
 
Constructor Summary
XhtmlMessageEmitter(ContentHandler contentHandler)
           
 
Method Summary
private  void emitErrorLevel(char[] level)
           
private  void emitLineLocation()
           
private  void emitRangeLocation()
           
private  void emitSingleLocation()
           
private  void emitSystemId()
           
 void endFullSource()
           
 void endMessage()
           
 void endMessages()
           
 void endResult()
           
 void endSource()
           
 void endText()
           
private  void maybeCloseList()
           
private  void maybeCloseTextPara()
           
private  void maybeEmitInResource()
           
private  void maybeEmitLocation()
           
private  void maybeOpenList()
           
 SourceHandler startFullSource()
           
 void startMessage(MessageType type, String systemId, int oneBasedFirstLine, int oneBasedFirstColumn, int oneBasedLastLine, int oneBasedLastColumn, boolean exact)
           
 void startMessages(String documentUri, boolean willShowSource)
           
 ResultHandler startResult()
           
 SourceHandler startSource()
           
 MessageTextHandler startText()
           
 
Methods inherited from class nu.validator.messages.MessageEmitter
endElaboration, startElaboration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLON_SPACE

private static final char[] COLON_SPACE

PERIOD

private static final char[] PERIOD

ON_LINE

private static final char[] ON_LINE

AT_LINE

private static final char[] AT_LINE

FROM_LINE

private static final char[] FROM_LINE

TO_LINE

private static final char[] TO_LINE

COLUMN

private static final char[] COLUMN

IN_RESOURCE

private static final char[] IN_RESOURCE

attrs

private final AttributesImpl attrs

listOpen

private boolean listOpen

contentHandler

private final ContentHandler contentHandler

emitter

private final XhtmlSaxEmitter emitter

messageTextHandler

private final XhtmlMessageTextHandler messageTextHandler

extractHandler

private final XhtmlExtractHandler extractHandler

textEmitted

private boolean textEmitted

systemId

private String systemId

oneBasedFirstLine

private int oneBasedFirstLine

oneBasedFirstColumn

private int oneBasedFirstColumn

oneBasedLastLine

private int oneBasedLastLine

oneBasedLastColumn

private int oneBasedLastColumn

exact

private boolean exact

willShowSource

private boolean willShowSource
Constructor Detail

XhtmlMessageEmitter

public XhtmlMessageEmitter(ContentHandler contentHandler)
Parameters:
contentHandler -
Method Detail

maybeOpenList

private void maybeOpenList()
                    throws SAXException
Throws:
SAXException

emitErrorLevel

private void emitErrorLevel(char[] level)
                     throws SAXException
Throws:
SAXException

endMessage

public void endMessage()
                throws SAXException
Specified by:
endMessage in class MessageEmitter
Throws:
SAXException

maybeCloseTextPara

private void maybeCloseTextPara()
                         throws SAXException
Throws:
SAXException

maybeEmitLocation

private void maybeEmitLocation()
                        throws SAXException
Throws:
SAXException

maybeEmitInResource

private void maybeEmitInResource()
                          throws SAXException
Throws:
SAXException

emitSystemId

private void emitSystemId()
                   throws SAXException
Throws:
SAXException

emitRangeLocation

private void emitRangeLocation()
                        throws SAXException
Throws:
SAXException

emitSingleLocation

private void emitSingleLocation()
                         throws SAXException
Throws:
SAXException

emitLineLocation

private void emitLineLocation()
                       throws SAXException
Throws:
SAXException

startMessage

public void startMessage(MessageType type,
                         String systemId,
                         int oneBasedFirstLine,
                         int oneBasedFirstColumn,
                         int oneBasedLastLine,
                         int oneBasedLastColumn,
                         boolean exact)
                  throws SAXException
Specified by:
startMessage in class MessageEmitter
Throws:
SAXException

endMessages

public void endMessages()
                 throws SAXException
Overrides:
endMessages in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endMessages()

maybeCloseList

private void maybeCloseList()
                     throws SAXException
Throws:
SAXException

endText

public void endText()
             throws SAXException
Overrides:
endText in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endText()

startMessages

public void startMessages(String documentUri,
                          boolean willShowSource)
                   throws SAXException
Overrides:
startMessages in class MessageEmitter
Throws:
SAXException
See Also:
nu.validator.messages.MessageEmitter#startMessages(java.lang.String)

startText

public MessageTextHandler startText()
                             throws SAXException
Overrides:
startText in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startText()

endSource

public void endSource()
               throws SAXException
Overrides:
endSource in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endSource()

startSource

public SourceHandler startSource()
                          throws SAXException
Overrides:
startSource in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startSource()

endFullSource

public void endFullSource()
                   throws SAXException
Overrides:
endFullSource in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endFullSource()

startFullSource

public SourceHandler startFullSource()
                              throws SAXException
Overrides:
startFullSource in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startFullSource()

endResult

public void endResult()
               throws SAXException
Overrides:
endResult in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.endResult()

startResult

public ResultHandler startResult()
                          throws SAXException
Overrides:
startResult in class MessageEmitter
Throws:
SAXException
See Also:
MessageEmitter.startResult()