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; }
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); } }