dk.brics.xsugar.validator
Class XMLValidator
java.lang.Object
dk.brics.xsugar.validator.XMLValidator
public class XMLValidator
- extends Object
Validator for XML graphs.
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 |
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 schemaschema_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
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.