Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 577 → Rev 578

/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.39 $
* @version $Revision: 1.40 $
*
* Last modification: $Date: 2003/07/15 19:14:58 $
* $Id: Validator.java,v 1.39 2003/07/15 19:14:58 smcsporr Exp $
* Last modification: $Date: 2003/07/16 17:16:10 $
* $Id: Validator.java,v 1.40 2003/07/16 17:16:10 smcsporr Exp $
*/
 
package src.parser;
27,6 → 27,10
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.OutputKeys;
 
import org.apache.xml.serializer.OutputPropertiesFactory;
import org.apache.xml.serializer.Serializer;
import org.apache.xml.serializer.SerializerFactory;
 
import org.w3c.dom.Document;
 
import org.xml.sax.InputSource;
46,7 → 50,7
*
* @author S. McSporran
*
* @version $Revision: 1.39 $ Last modification: $Date: 2003/07/15 19:14:58 $
* @version $Revision: 1.40 $ Last modification: $Date: 2003/07/16 17:16:10 $
*/
public class Validator {
 
367,7 → 371,7
/* Save the transformation result to a string buffer. */
StringWriter outputWr = new StringWriter();
StreamResult sResult = new StreamResult(outputWr);
StreamResult sResult = new StreamResult();
/* Save the DOCTYPE-Entry in case of an external DTD. */
if ((doc.getDoctype() != null) && (doc.getDoctype().getInternalSubset() == null)) {
383,6 → 387,11
/* Get the buffer associated with the StringWriter outputWr. */
StringBuffer buffer = outputWr.getBuffer();
Serializer serializer = SerializerFactory.getSerializer(
OutputPropertiesFactory.getDefaultMethodProperties("xml"));
serializer.setWriter(outputWr);
log(LogInterface.TYPE_ERROR, buffer.toString());
/* Set valid status in the ValidationErrorHandler to true. */