コード例 #1
0
		public static int sMain (string [] args)
		{
			if (args.Length < 1) {
				Console.WriteLine ("Usage: monodoc2wiki monodoc_xmlfile");
				return 1;
			}

			XmlDocument doc = new XmlDocument ();
#if VALIDATION
			XmlTextReader xr = new XmlTextReader (args [0]);
			RelaxngPattern rp = RncParser.ParseRnc (new StreamReader ("CLILibraryTypes.rnc"));
Console.Error.WriteLine ("**** READY ****");
rp.Compile ();
Console.Error.WriteLine ("**** DONE ****");
			RelaxngValidatingReader rvr = new RelaxngValidatingReader (xr, rp);
			doc.Load (rvr);
			rvr.Close ();
#else
			doc.Load (args [0]);
#endif
			Monodoc2Wiki instance = new Monodoc2Wiki ();
			string ret = instance.ProcessNode (doc.DocumentElement);

			Console.WriteLine (ret);

			return 0;
		}
コード例 #2
0
ファイル: RncTests.cs プロジェクト: Profit0004/mono
		public void SimpleDefaultNamespace ()
		{
			var g = RncParser.ParseRnc (new StringReader ("element e { empty }"));
			var x = XmlReader.Create (new StringReader ("<e/>"));
			var r = new RelaxngValidatingReader (x, g); 
			try {
				while (!r.EOF)
					r.Read ();
			} finally {
				r.Close ();
			}
		}
コード例 #3
0
ファイル: RncTests.cs プロジェクト: Profit0004/mono
		public void InheritDefaultNamespace ()
		{
			RelaxngPattern g = Compile ("Test/XmlFiles/include-default-namespace.rnc");
			XmlReader xtr = new XmlTextReader ("Test/XmlFiles/include-default-namespace.xml");
			RelaxngValidatingReader r = new RelaxngValidatingReader (xtr, g);
			try {
				while (!r.EOF)
					r.Read ();
			} finally {
				r.Close ();
			}
		}