in scala/xml/dtd
class ElementValidator

class ElementValidator()
extends (Node) => Boolean
with ScalaObject

validate children and/or attributes of an element exceptions are created but not thrown.

Method Summary
protected var adecls: List[AttrDecl]
  def apply(n: Node): Boolean
     applies various validations - accumulates error messages in exc
  def check(md: MetaData): Boolean
     check attributes, return true if md corresponds to attribute declarations in adecls.
  def check(nodes: Seq[Node]): Boolean
     check children, return true if conform to content model
protected var contentModel: ContentModel
protected var dfa: DetWordAutom[ElemName]
  var exc: List[ValidationException]
  def getContentModel: ContentModel
  def getIterator(nodes: Seq[Node], skipPCDATA: Boolean): Iterator[ElemName]
  def setContentModel(cm: ContentModel): Unit
     set content model, enabling element validation
  def setMetaData(adecls: List[AttrDecl]): Unit
     set meta data, enabling attribute validation

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

Method Detail

exc

  var exc: List[ValidationException]

contentModel

  protected var contentModel: ContentModel

dfa

  protected var dfa: DetWordAutom[ElemName]

adecls

  protected var adecls: List[AttrDecl]

setContentModel

  def setContentModel(cm: ContentModel): Unit
set content model, enabling element validation

getContentModel

  def getContentModel: ContentModel

setMetaData

  def setMetaData(adecls: List[AttrDecl]): Unit
set meta data, enabling attribute validation

getIterator

  def getIterator(nodes: Seq[Node], skipPCDATA: Boolean): Iterator[ElemName]

check

  def check(md: MetaData): Boolean
check attributes, return true if md corresponds to attribute declarations in adecls.

check

  def check(nodes: Seq[Node]): Boolean
check children, return true if conform to content model
Pre:
contentModel != null

apply

  def apply(n: Node): Boolean
applies various validations - accumulates error messages in exc
Todo::
fail on first error, ignore other errors (rearranging conditions)