예제 #1
0
파일: ecma-provider.cs 프로젝트: RAOF/mono
	static void EnsureTransform ()
	{
		if (ecma_transform == null) {
			ecma_transform_css = new XslCompiledTransform ();
			ecma_transform_no_css = new XslCompiledTransform ();
			Assembly assembly = System.Reflection.Assembly.GetCallingAssembly ();
			
			Stream stream = assembly.GetManifestResourceStream ("mono-ecma-css.xsl");
			XmlReader xml_reader = new XmlTextReader (stream);
			XmlResolver r = new ManifestResourceResolver (".");
			ecma_transform_css.Load (xml_reader, XsltSettings.TrustedXslt, r);
			
			stream = assembly.GetManifestResourceStream ("mono-ecma.xsl");
			xml_reader = new XmlTextReader (stream);
			ecma_transform_no_css.Load (xml_reader, XsltSettings.TrustedXslt, r);
		}
		if (use_css)
			ecma_transform = ecma_transform_css;
		else
			ecma_transform = ecma_transform_no_css;
	}
예제 #2
0
		static void EnsureTransform ()
		{
			if (ecma_transform == null) {
				ecma_transform = new XslCompiledTransform ();
				var assembly = System.Reflection.Assembly.GetAssembly (typeof (Ecma2Html));
			
				Stream stream = assembly.GetManifestResourceStream ("mono-ecma-css.xsl");
				XmlReader xml_reader = new XmlTextReader (stream);
				XmlResolver r = new ManifestResourceResolver (".");
				ecma_transform.Load (xml_reader, XsltSettings.TrustedXslt, r);			
			}
		}