Package org.apache.sling.scripting.sightly.impl.html.dom.template

## Class TemplateParser.TemplateParserContext

- java.lang.Object
- - org.apache.sling.scripting.sightly.impl.html.dom.template.TemplateParser.TemplateParserContext

All Implemented Interfaces:
  `DocumentHandler`

Enclosing class:
  TemplateParser

    public static final class TemplateParser.TemplateParserContext
    extends Object
    implements DocumentHandler

### Constructor Summary

Constructors
`TemplateParserContext()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Template` `getTemplate()`
`void` `onCharacters​(char[] ch, int off, int len)` Receive notification of unparsed character data.
`void` `onComment​(String text)`
`void` `onEnd()` Receive notification of parsing end.
`void` `onEndElement​(String name)` Receive notification of the end of an element.
`void` `onStart()` Receive notification of parsing start.
`void` `onStartElement​(String name, AttributeList attList, boolean endSlash)` Receive notification of the beginning of an element.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TemplateParserContext

    public TemplateParserContext()

### Method Detail

#### getTemplate

    public Template getTemplate()

#### onStart

    public void onStart()
                 throws IOException

Description copied from interface: `DocumentHandler`
Receive notification of parsing start.

Specified by:
  `onStart` in interface `DocumentHandler`
Throws:
  `IOException` - if the parsing operation cannot start

#### onEnd

    public void onEnd()
               throws IOException

Description copied from interface: `DocumentHandler`
Receive notification of parsing end.

Specified by:
  `onEnd` in interface `DocumentHandler`
Throws:
  `IOException` - if the parsing operation cannot end

#### onStartElement

    public void onStartElement​(String name,
                               AttributeList attList,
                               boolean endSlash)

Description copied from interface: `DocumentHandler`
Receive notification of the beginning of an element.

Specified by:
  `onStartElement` in interface `DocumentHandler`
Parameters:
  `name` - tag name
  `attList` - attribute list
  `endSlash` - flag indicating whether the element is closed with an ending slash (xhtml-compliant)

#### onEndElement

    public void onEndElement​(String name)

Description copied from interface: `DocumentHandler`
Receive notification of the end of an element.

Specified by:
  `onEndElement` in interface `DocumentHandler`
Parameters:
  `name` - tag name

#### onCharacters

    public void onCharacters​(char[] ch,
                             int off,
                             int len)

Description copied from interface: `DocumentHandler`
Receive notification of unparsed character data.

Specified by:
  `onCharacters` in interface `DocumentHandler`
Parameters:
  `ch` - the character buffer
  `off` - the offset
  `len` - the length of the unparsed character data

#### onComment

    public void onComment​(String text)
                   throws IOException

Specified by:
  `onComment` in interface `DocumentHandler`
Throws:
  `IOException`