dk.brics.xmlgraph
Class WelldefinedChecker

java.lang.Object
  extended by dk.brics.xmlgraph.WelldefinedChecker

public class WelldefinedChecker
extends Object

Checker for well-definedness of XML graphs.

Definitions:

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

WelldefinedChecker

public WelldefinedChecker(PrintStream err)
Constructs a new checker.

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

check

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

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


Copyright © 2005-2010 Anders Møller.