dk.brics.xsugar.validator
Class XMLValidator

java.lang.Object
  extended by dk.brics.xsugar.validator.XMLValidator

public class XMLValidator
extends Object

Validator for XML graphs.


Constructor Summary
XMLValidator(String schema_file, String schema_root, PrintWriter out)
          Constructs a new validator for the given schema.
 
Method Summary
 int validate(XMLGraph xg)
          Validates the given XML graph (constructed from an XSugar stylesheet).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLValidator

public XMLValidator(String schema_file,
                    String schema_root,
                    PrintWriter out)
             throws MalformedURLException,
                    ParseException
Constructs a new validator for the given schema.

Parameters:
schema_file - location of schema
schema_root - root element (on the form {namespaceURI}localname), if null then auto-detect (for DTD) or use all globally defined (for XML Schema)
out - print writer for output messages (if null, use System.out with default encoding)
Throws:
MalformedURLException
ParseException
Method Detail

validate

public int validate(XMLGraph xg)
Validates the given XML graph (constructed from an XSugar stylesheet).

Parameters:
xg - XML graph
Returns:
number of errors detected


Copyright © 2004-2007 Anders Møller & Claus Brabrand.