Beispiel #1
0
		/// <summary>
		/// Выполняет работу по преобразованию XSLT
		/// </summary>
		/// <param name="args"></param>
		public static void Main(string[] args) {
			var opts = new Qorpent.Utils.ConsoleArgumentHelper().Parse<EXsltParameters>(args);
			if(opts.Src.IsEmpty()) {
				throw new Exception("source file not defined");
			}
			if(opts.Out.IsEmpty()) {
				opts.Out = opts.Src + ".result";
			}
			var h = new Qorpent.Dsl.SmartXslt.XsltHelper();
			var sw = new StringWriter();
			h.Process(opts.Src,sw,opts.Trs);
			var content = sw.ToString();
			var writer = new Qorpent.Dsl.FileSplitWriter();
			writer.WriteContent(opts.Out, content);
		}
Beispiel #2
0
        /// <summary>
        /// Выполняет работу по преобразованию XSLT
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            var opts = new Qorpent.Utils.ConsoleArgumentHelper().Parse <EXsltParameters>(args);

            if (opts.Src.IsEmpty())
            {
                throw new Exception("source file not defined");
            }
            if (opts.Out.IsEmpty())
            {
                opts.Out = opts.Src + ".result";
            }
            var h  = new Qorpent.Dsl.SmartXslt.XsltHelper();
            var sw = new StringWriter();

            h.Process(opts.Src, sw, opts.Trs);
            var content = sw.ToString();
            var writer  = new Qorpent.Dsl.FileSplitWriter();

            writer.WriteContent(opts.Out, content);
        }