Package relaxngcc.parser

# Class ParserRuntime

java.lang.Object
relaxngcc.parser.state.NGCCRuntime
relaxngcc.parser.ParserRuntime

All Implemented Interfaces:
  `ContentHandler`, `NGCCEventSource`

Direct Known Subclasses:
  `IncludeParserRuntime`, `RootParserRuntime`

public abstract class ParserRuntime extends NGCCRuntime

Author:
  Kohsuke Kawaguchi (kk@kohsuke.org)

## Field Summary

Fields
Modifier and Type
Field
Description
`Grammar`
`grammar`
Grammar object that we are currently building.

## Method Summary

Modifier and Type
Method
Description
`void`
`addError(BuildError err)`
`Locator`
`createLocator()`
`void`
`endElement(String uri, String local, String qname)`
`Datatype`
`getDatatype(String name)`
Gets the current datatype library.
`abstract RootParserRuntime`
`getRootRuntime()`
Gets the reference to the root runtime.
`String`
`getTargetNamespace()`
Gets the value of the current "ns".
`Iterator`
`iterateErrors()`
`void`
`parse(String source)`
Parses a document with this runtime.
`NameClass`
`parseSimpleName(String qname, boolean attributeMode)`
Parses a QName into a SimpleNameClass.
`void`
`processInclude(String href)`
Processes the <include> element.
`void`
`startElement(String uri, String local, String qname, Attributes atts)`

### Methods inherited from class relaxngcc.parser.state.NGCCRuntime

`characters, consumeAttribute, endDocument, endPrefixMapping, getAttributeIndex, getCurrentAttributes, getLocator, ignorableWhitespace, onEnterElementConsumed, onLeaveElementConsumed, processingInstruction, processList, redirectSubtree, replace, reset, resolveNamespacePrefix, sendEnterAttribute, sendEnterElement, sendLeaveAttribute, sendLeaveElement, sendText, setDocumentLocator, setRootHandler, skippedEntity, startDocument, startPrefixMapping, trace, traceln`

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

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

### Methods inherited from interface org.xml.sax.ContentHandler

`declaration`

## Field Details

### grammar

public Grammar grammar
Grammar object that we are currently building.

## Method Details

### parse

public void parse(String source) throws SAXException
Parses a document with this runtime.

Throws:
  `SAXException`

### parseSimpleName

public NameClass parseSimpleName(String qname, boolean attributeMode)
Parses a QName into a SimpleNameClass.

### processInclude

public void processInclude(String href) throws SAXException
Processes the <include> element.

Throws:
  `SAXException`

### getRootRuntime

public abstract RootParserRuntime getRootRuntime()
Gets the reference to the root runtime.

### getTargetNamespace

public String getTargetNamespace()
Gets the value of the current "ns".

### getDatatype

public Datatype getDatatype(String name)
Gets the current datatype library.

### createLocator

public Locator createLocator()

### startElement

public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException

Specified by:
  `startElement` in interface `ContentHandler`
Overrides:
  `startElement` in class `NGCCRuntime`
Throws:
  `SAXException`

### endElement

public void endElement(String uri, String local, String qname) throws SAXException

Specified by:
  `endElement` in interface `ContentHandler`
Overrides:
  `endElement` in class `NGCCRuntime`
Throws:
  `SAXException`

### addError

public void addError(BuildError err)

### iterateErrors

public Iterator iterateErrors()