in scala/xml/parsing
class MarkupHandler

abstract class MarkupHandler()
extends Object
with ScalaObject
with Logged
Implementing classes or objects:
trait NodeTraverser() in scala/xml
class ConstructingHandler()
class DefaultMarkupHandler()
class ValidatingMarkupHandler()

class that handles markup - provides callback methods to MarkupParser. the default is nonvalidating behaviour
Todo:
can we ignore more entity declarations (i.e. those with extIDs)?
Todo:
expanding entity references

Field Summary
  val isValidating: Boolean
     returns true is this markup handler is validing

Method Summary
  def attListDecl(name: String, attList: List[AttrDecl]): Unit
abstract def comment(pos: Int, comment: String): NodeSeq
     callback method invoked by MarkupParser after parsing comment.
  var decls: List[Decl]
abstract def elem(pos: Int, pre: String, label: String, attrs: MetaData, scope: NamespaceBinding, args: NodeSeq): NodeSeq
     callback method invoked by MarkupParser after parsing an elementm, between the elemStart and elemEnd callbacks
  def elemDecl(n: String, cmstr: String): Unit
  def elemEnd(pos: Int, pre: String, label: String): Unit
     callback method invoked by MarkupParser after end-tag of element.
  def elemStart(pos: Int, pre: String, label: String, attrs: MetaData, scope: NamespaceBinding): Unit
     callback method invoked by MarkupParser after start-tag of element.
  def endDTD(n: String): Unit
  var ent: Map[String,EntityDecl]
abstract def entityRef(pos: Int, n: String): NodeSeq
     callback method invoked by MarkupParser after parsing entity ref.
  def lookupElemDecl(Label: String): ElemDecl
  def notationDecl(notat: String, extID: ExternalID): Unit
  def parameterEntityDecl(name: String, edef: EntityDef): Unit
  def parsedEntityDecl(name: String, edef: EntityDef): Unit
  def peReference(name: String): Unit
abstract def procInstr(pos: Int, target: String, txt: String): NodeSeq
     callback method invoked by MarkupParser after parsing PI.
  def replacementText(entityName: String): Source
abstract def reportSyntaxError(pos: Int, str: String): Unit
     report a syntax error
abstract def text(pos: Int, txt: String): NodeSeq
     callback method invoked by MarkupParser after parsing text.
  def unparsedEntityDecl(name: String, extID: ExternalID, notat: String): Unit

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/util/logging/Logged-class
log

Field Detail

isValidating

  val isValidating: Boolean
returns true is this markup handler is validing
Method Detail

decls

  var decls: List[Decl]

ent

  var ent: Map[String,EntityDecl]

lookupElemDecl

  def lookupElemDecl(Label: String): ElemDecl

replacementText

  def replacementText(entityName: String): Source

endDTD

  def endDTD(n: String): Unit

elemStart

  def elemStart(pos: Int, pre: String, label: String, attrs: MetaData, scope: NamespaceBinding): Unit
callback method invoked by MarkupParser after start-tag of element.
Parameters:
pos - the position in the sourcefile
pre - the prefix
label - the local name
attrs - the attributes (metadata)

elemEnd

  def elemEnd(pos: Int, pre: String, label: String): Unit
callback method invoked by MarkupParser after end-tag of element.
Parameters:
pos - the position in the sourcefile
pre - the prefix
label - the local name
attrs - the attributes (metadata)

elem

  abstract def elem(pos: Int, pre: String, label: String, attrs: MetaData, scope: NamespaceBinding, args: NodeSeq): NodeSeq
callback method invoked by MarkupParser after parsing an elementm, between the elemStart and elemEnd callbacks
Parameters:
pos - the position in the sourcefile
pre - the prefix
label - the local name
attrs - the attributes (metadata)
args - the children of this element

procInstr

  abstract def procInstr(pos: Int, target: String, txt: String): NodeSeq
callback method invoked by MarkupParser after parsing PI.

comment

  abstract def comment(pos: Int, comment: String): NodeSeq
callback method invoked by MarkupParser after parsing comment.

entityRef

  abstract def entityRef(pos: Int, n: String): NodeSeq
callback method invoked by MarkupParser after parsing entity ref.
Todo:
expanding entity references

text

  abstract def text(pos: Int, txt: String): NodeSeq
callback method invoked by MarkupParser after parsing text.

elemDecl

  def elemDecl(n: String, cmstr: String): Unit

attListDecl

  def attListDecl(name: String, attList: List[AttrDecl]): Unit

parameterEntityDecl

  def parameterEntityDecl(name: String, edef: EntityDef): Unit

parsedEntityDecl

  def parsedEntityDecl(name: String, edef: EntityDef): Unit

unparsedEntityDecl

  def unparsedEntityDecl(name: String, extID: ExternalID, notat: String): Unit

notationDecl

  def notationDecl(notat: String, extID: ExternalID): Unit

peReference

  def peReference(name: String): Unit

reportSyntaxError

  abstract def reportSyntaxError(pos: Int, str: String): Unit
report a syntax error