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[java.lang.String, EntityDecl]
val isValidating : Boolean
returns true is this markup handler is validing
Method Summary
def attListDecl (name : java.lang.String, attList : List[AttrDecl]) : Unit
abstract def comment (pos : Int, comment : java.lang.String) : NodeSeq
callback method invoked by MarkupParser after parsing comment.
abstract def elem (pos : Int, pre : java.lang.String, label : java.lang.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 : java.lang.String, cmstr : java.lang.String) : Unit
def elemEnd (pos : Int, pre : java.lang.String, label : java.lang.String) : Unit
callback method invoked by MarkupParser after end-tag of element.
def elemStart (pos : Int, pre : java.lang.String, label : java.lang.String, attrs : MetaData, scope : NamespaceBinding) : Unit
callback method invoked by MarkupParser after start-tag of element.
def endDTD (n : java.lang.String) : Unit
abstract def entityRef (pos : Int, n : java.lang.String) : NodeSeq
callback method invoked by MarkupParser after parsing entity ref.
def lookupElemDecl (Label : java.lang.String) : ElemDecl
def notationDecl (notat : java.lang.String, extID : ExternalID) : Unit
def parameterEntityDecl (name : java.lang.String, edef : EntityDef) : Unit
def parsedEntityDecl (name : java.lang.String, edef : EntityDef) : Unit
def peReference (name : java.lang.String) : Unit
abstract def procInstr (pos : Int, target : java.lang.String, txt : java.lang.String) : NodeSeq
callback method invoked by MarkupParser after parsing PI.
def replacementText (entityName : java.lang.String) : Source
abstract def reportSyntaxError (pos : Int, str : java.lang.String) : Unit
report a syntax error
abstract def text (pos : Int, txt : java.lang.String) : NodeSeq
callback method invoked by MarkupParser after parsing text.
def unparsedEntityDecl (name : java.lang.String, extID : ExternalID, notat : java.lang.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[java.lang.String, EntityDecl]

Method Details
def lookupElemDecl(Label : java.lang.String) : ElemDecl

def replacementText(entityName : java.lang.String) : Source

def endDTD(n : java.lang.String) : Unit

def elemStart(pos : Int, pre : java.lang.String, label : java.lang.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 : java.lang.String, label : java.lang.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 : java.lang.String, label : java.lang.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 : java.lang.String, txt : java.lang.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 : java.lang.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 : java.lang.String) : NodeSeq
callback method invoked by MarkupParser after parsing entity ref.
Todo
expanding entity references

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

def elemDecl(n : java.lang.String, cmstr : java.lang.String) : Unit

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

def parameterEntityDecl(name : java.lang.String, edef : EntityDef) : Unit

def parsedEntityDecl(name : java.lang.String, edef : EntityDef) : Unit

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

def notationDecl(notat : java.lang.String, extID : ExternalID) : Unit

def peReference(name : java.lang.String) : Unit

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