Esempio n. 1
0
        private void ValidateInstance(string ver)
        {
            XmlReader xr = XmlReader.Create(new StringReader(_sw.ToString()));

            _output.WriteLine("Validating XML Instance using Validating XSLT ...");

            if (ver == "v1")
            {
                _xsltV1.Load(xr, new XmlUrlResolver());
                _xsltV1.Transform(_xmlFile, _outFile);
            }
            else if (ver == "v2")
            {
                _xsltV2.Load(xr, new XsltSettings(), new XmlUrlResolver());
                _xsltV2.Transform(_xmlFile, _outFile);
            }

            _utils.WriteFile(_outFile);
        }