scala.xml.parsing

class MarkupHandler

[source: scala/xml/parsing/MarkupHandler.scala]

abstract class MarkupHandler
extends Logged
class that handles markup - provides callback methods to MarkupParser. the default is nonvalidating behaviour
Author
Burak Emir
Version
1.0
Todo
can we ignore more entity declarations (i.e. those with extIDs)?
expanding entity references
Direct Known Subclasses:
NodeTraverser, ConstructingHandler, DefaultMarkupHandler, ValidatingMarkupHandler, XMLEventReader.Parser

Value Summary
var decls : List[Decl]
var ent : Map[String, EntityDecl]
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.
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
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 Logged
log
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
val isValidating : Boolean
returns true is this markup handler is validing

var decls : List[Decl]

var ent : Map[String, EntityDecl]

Method Details
def lookupElemDecl(Label : String) : ElemDecl

def replacementText(entityName : String) : Source

def endDTD(n : String) : Unit

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)

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 source file
pre - the prefix
label - the local name
attrs - the attributes (metadata)

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 source file
pre - the prefix
label - the local name
attrs - the attributes (metadata)
args - the children of this element
Returns
...

abstract def procInstr(pos : Int, target : String, txt : String) : NodeSeq
callback method invoked by MarkupParser after parsing PI.
Parameters
pos - the position in the source file
target - ...
txt - ...
Returns
...

abstract def comment(pos : Int, comment : String) : NodeSeq
callback method invoked by MarkupParser after parsing comment.
Parameters
pos - the position in the source file
comment - ...
Returns
...

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

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

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

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

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

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

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

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

def peReference(name : String) : Unit

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