0

Reports / Validating XML

Posted by lorenb on Apr 26, 2005 in gnome, projects

Still working on the reporting. I can generate about half of a report right now. I need to re-work some of the interpreter code to save more information about test results. Once I do that I’ll be able to generate a complete report.

Also I wrote some code today so I could validate the OVAL definitions XML. I’m using the XmlValidatingReader Class to do this.

try
{
	XmlValidatingReader vr = new XmlValidatingReader (reader);

	XmlSchemaCollection sc = new XmlSchemaCollection ();
	sc.Add("oval", @"oval-schema.xsd");
	sc.Add("redhat", @"redhat-schema.xsd");

	vr.Schemas.Add (sc);

	Logger.Log.Info ("Validating...");

	vr.ValidationEventHandler += new
		ValidationEventHandler (ValidateEventHandler);

	while (vr.Read())
	{
	}

}
catch (Exception e)
{
	Console.WriteLine (e.Message);
}

In theory the code should work but in practice I’m getting an XML Schema error about subtestAttributes. I’ll have to leave this code disabled until I resolve that.

 
0

Report Generation

Posted by lorenb on Apr 26, 2005 in gnome, projects

YesterdayI didn’t get much done on Sussen due to on-site work I needed to do for a client.

Today I’m working on report generation. I’ve been reading the oval results schema and looking at sample reports. I’ve got some initial code written but it’s still early in the process.

Should have more of an update later on today.

Copyright © 2009 Loren Bandiera’s weblog All rights reserved. Theme by Laptop Geek.