private void ValidateInstanceDoc( Taxonomy tax,
			string fileName, int countErrors, Hashtable prefixXRef )
        {
            Instance ins = new Instance();
            ArrayList errs;
            if( !ins.TryLoadInstanceDoc( fileName, out errs ))
            {
                Assert.Fail( "Failed to load instance document" + fileName);
            }
            foreach( MarkupProperty mp in ins.markups )
            {
                if ( prefixXRef[mp.elementPrefix] != null )
                {
                    string realPrefix = prefixXRef[mp.elementPrefix] as string;
                    mp.elementPrefix = realPrefix;
                    mp.elementId = string.Format(DocumentBase.ID_FORMAT, mp.elementPrefix, mp.elementName);

                }

            }
            string[] validationErrors;
            tax.ValidateInstanceInformationForRequiresElementCheck( ins, out validationErrors );

            Assert.IsNotNull( validationErrors , "Validation errors object should not be null");
            foreach( string str in validationErrors )
            {
                Console.WriteLine( str );
            }
            Assert.AreEqual( countErrors, validationErrors.Length,"Failed to ValidateInstanceInformationForRequiresElementCheck");
        }