com.arsdigita.templating.html.demo
Class DemoTagHandler

java.lang.Object
  extended bycom.arsdigita.templating.html.demo.DemoTagHandler
All Implemented Interfaces:
ContentHandler

public class DemoTagHandler
extends Object
implements ContentHandler

Handles two custom tags: <toc/> and <footnote>. See com.arsdigita.templating.html.demo for details.

Since:
2002-08-21
Version:
$Date: 2004/04/07 $
Author:
Vadim Nasardinov (vadimn@redhat.com)
See Also:
com.arsdigita.templating.html.demo

Constructor Summary
DemoTagHandler()
           
 
Method Summary
 void endDocument()
          Receives notification of the end of a document.
 void endElement(String qName)
          Receives notification of the end of an element.
 String getExtrapolatedDocument()
           
static String getExtrapolatedDocument(String textWithCustomMarkup)
           
 boolean isValid(String qName)
           
 void startDocument()
          Receives notification of the beginning of a document.
 void startElement(String qName, AttributeMap attrs)
          Receives notification of the beginning of an element.
 void text(String text)
          Receives notification of textual data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoTagHandler

public DemoTagHandler()
Method Detail

startDocument

public void startDocument()
Description copied from interface: ContentHandler
Receives notification of the beginning of a document.

Specified by:
startDocument in interface ContentHandler

endDocument

public void endDocument()
                 throws HTMLParserException
Description copied from interface: ContentHandler
Receives notification of the end of a document.

Specified by:
endDocument in interface ContentHandler
Throws:
HTMLParserException

text

public void text(String text)
          throws HTMLParserException
Description copied from interface: ContentHandler
Receives notification of textual data.

Specified by:
text in interface ContentHandler
Throws:
HTMLParserException

isValid

public boolean isValid(String qName)

startElement

public void startElement(String qName,
                         AttributeMap attrs)
                  throws HTMLParserException
Description copied from interface: ContentHandler
Receives notification of the beginning of an element. The parser will only notify the handler of those elements for which HTMLParser.isRegistered(String) is true. Any other HTML markup will be treated as text and will be dispatched to ContentHandler.text(String).

Specified by:
startElement in interface ContentHandler
Throws:
HTMLParserException

endElement

public void endElement(String qName)
                throws HTMLParserException
Description copied from interface: ContentHandler
Receives notification of the end of an element. The parser will only notify the handler of those elements for which HTMLParser.isRegistered(String) is true. Any other HTML markup will be treated as text and will be dispatched to ContentHandler.text(String).

Specified by:
endElement in interface ContentHandler
Throws:
HTMLParserException

getExtrapolatedDocument

public String getExtrapolatedDocument()

getExtrapolatedDocument

public static String getExtrapolatedDocument(String textWithCustomMarkup)
                                      throws HTMLParserException
Throws:
HTMLParserException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC