Class WelldefinedChecker

  extended by dk.brics.xmlgraph.WelldefinedChecker

public class WelldefinedChecker
extends Object

Checker for well-definedness of XML graphs.


The following properties are checked:

  1. [interleaved content] Every node that has a child that top-level contains an InterleaveNode content node must be a SequenceNode or ElementNode. Also, a SequenceNode that top-level contains an InterleaveNode content node must have only one content node child.

  2. [all nodes productive] Every node must be productive in the sense that it has at least one unfolding.

Nodes that are not reachable from a root are ignored.

Constructor Summary
WelldefinedChecker(PrintStream err)
          Constructs a new checker.
Method Summary
 boolean check(XMLGraph xg)
          Checks the given XML graph.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public WelldefinedChecker(PrintStream err)
Constructs a new checker.

err - print stream for error messages, null if none
Method Detail


public boolean check(XMLGraph xg)
Checks the given XML graph.

xg - XML graph
true if the properties listed above are satisfied

Copyright © 2005-2010 Anders Møller.