Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 725 → Rev 726

/sun/xmleditor/trunk/src/parser/Validator.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.47 $
* @version $Revision: 1.48 $
*
* Last modification: $Date: 2003/07/21 18:19:58 $
* $Id: Validator.java,v 1.47 2003/07/21 18:19:58 smcsporr Exp $
* Last modification: $Date: 2003/07/22 13:59:06 $
* $Id: Validator.java,v 1.48 2003/07/22 13:59:06 smcsporr Exp $
*/
 
package src.parser;
43,12 → 43,13
import src.gui.StatusInterface;
 
/**
* The <code>Validator</code> class is used to validate a document, if a grammar
* has been specified.
* An instance of the <b><code>Validator</code></b> class is a validating
* parser that can be used to parse and validate DOM document implementations.
* It uses the Xerces SAX 2.0 parser implementation.
*
* @author S. McSporran
*
* @version $Revision: 1.47 $ Last modification: $Date: 2003/07/21 18:19:58 $
* @version $Revision: 1.48 $ Last modification: $Date: 2003/07/22 13:59:06 $
*/
public class Validator {
 
77,6 → 78,7
* @param logI: A reference to a log panel implementation.
* @param statI: A reference to a status panel implementation.
*
* @see org.xml.sax.XMLReader
* @see src.gui.LogInterface
* @see src.gui.StatusInterface
*
110,7 → 112,6
/* Catch errors while creating the parser object. */
catch (SAXException saxe1) {
try {
/* Use the system's standard SAX parser. */
142,8 → 143,10
createTransformer();
}
/**
* This method creates an instance of a <code>Transformer</code> object.
/*
* This method creates an instance of a <code>Transformer</code> object
* which is used by this class to generate an output stream from
* a <code>Document </code> object.
*
* @see javax.xml.transform.Transformer
*
166,7 → 169,7
}
}
/**
/*
* This method registers an instance of the <code>ValidationErrorHandler</code> class
* with the parser.
*
185,7 → 188,7
activeParser.setErrorHandler(eHandler);
}
/**
/*
* This method activates the validation feature of the parser.
*
* @see <a href="http://xml.apache.org/xerces2-j/features.html">xerces validation</a>
217,7 → 220,7
}
}
/**
/*
* This method activates the dynamic validation feature of the parser.
*
* author S. McSporran
247,7 → 250,7
}
}
/**
/*
* This method activates the XML schema support of the parser.
*
* author S. McSporran
277,7 → 280,7
}
}
/**
/*
* This method activates the namespace feature of the parser.
*
* author S. McSporran
306,7 → 309,7
}
}
/**
/*
* This method activates the continue-after-fatal-error feature of the parser.
*
* author S. McSporran
335,11 → 338,12
}
}
/**
/*
* This method validates a DOM document object.
*
* @param doc: The document to be validated.
* @return Returns true, if the document is valid.
* @return <code>true</code>, if the document fits to it's specified grammar,
* <code>false</code> otherwise.
*
* author S. McSporran
*
411,7 → 415,7
return eHandler.isValid();
}
/**
/*
* This method validates an <code>InputStream</code>.
*
* @param inStream: The stream to be validated.