fi.iki.hsivonen.xml
Class HeadingShiftFilter

java.lang.Object
  extended by gnu.xml.pipeline.EventFilter
      extended by fi.iki.hsivonen.xml.HeadingShiftFilter
All Implemented Interfaces:
gnu.xml.pipeline.EventConsumer, ContentHandler, DTDHandler, DeclHandler, LexicalHandler

public class HeadingShiftFilter
extends gnu.xml.pipeline.EventFilter


Field Summary
private static String[] HEADING_TARGETS
           
private static String[] HEADINGS
           
private  int offset
           
private static String XHTML_NS
          The XHTML namespace URI
 
Fields inherited from class gnu.xml.pipeline.EventFilter
DECL_HANDLER, FEATURE_URI, LEXICAL_HANDLER, PROPERTY_URI
 
Constructor Summary
HeadingShiftFilter(gnu.xml.pipeline.EventConsumer next, int offset)
           
 
Method Summary
 void endElement(String ns, String local, String q)
           
private  String mapName(String name)
           
 void startElement(String ns, String local, String q, Attributes attrs)
           
 
Methods inherited from class gnu.xml.pipeline.EventFilter
attributeDecl, bind, chainTo, characters, comment, elementDecl, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, externalEntityDecl, getContentHandler, getDocumentLocator, getDTDHandler, getErrorHandler, getNext, getProperty, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, setContentHandler, setDocumentLocator, setDTDHandler, setErrorHandler, setProperty, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XHTML_NS

private static final String XHTML_NS
The XHTML namespace URI

See Also:
Constant Field Values

HEADINGS

private static String[] HEADINGS

HEADING_TARGETS

private static String[] HEADING_TARGETS

offset

private int offset
Constructor Detail

HeadingShiftFilter

public HeadingShiftFilter(gnu.xml.pipeline.EventConsumer next,
                          int offset)
Method Detail

mapName

private String mapName(String name)

endElement

public void endElement(String ns,
                       String local,
                       String q)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class gnu.xml.pipeline.EventFilter
Throws:
SAXException
See Also:
EventFilter.endElement(java.lang.String, java.lang.String, java.lang.String)

startElement

public void startElement(String ns,
                         String local,
                         String q,
                         Attributes attrs)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class gnu.xml.pipeline.EventFilter
Throws:
SAXException
See Also:
EventFilter.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)