Here is my code, it's failing validation below, where I've bolded, italicized, etc.
Since it is working , if only showing a failure, that's a good sign. Don't know just yet why I can't attach a debugger but even without, nothing jumps out at me here.
Keeping it simple ... I'm missing the right schema definition and that's the problem. Also, the template file does *not* have an associated .resources file, that jumps out at me. I'm going to look up portal.template.xsd now and see if the most recent schema just ain't thar. :) (not present)
try
{
bool blnChild = true; //Set this to true. Parent Portals will never be created by ABFR
string strPortalAlias = string.Empty;
string strChildPath = string.Empty;
var closePopUpStr = string.Empty;
var objPortalController = new PortalController();
//check template validity
var messages = new ArrayList();
string schemaFilename = Server.MapPath(string.Concat(AppRelativeTemplateSourceDirectory, "portal.template.xsd"));
string xmlFilename = template.TemplateFilePath;
var xval = new PortalTemplateValidator();
if (!xval.Validate(xmlFilename, schemaFilename))
{
DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, "", String.Format(Localization.GetString("InvalidTemplate", LocalResourceFile),
Path.GetFileName(template.TemplateFilePath)), ModuleMessage.ModuleMessageType.RedError);
messages.AddRange(xval.Errors);
lstResults.Visible = true;
lstResults.DataSource = messages;
lstResults.DataBind();
validationPanel.Visible = true;
return;
}