The former condition is to disable <msxsl:script> element.
The latter is to disable XslCompiledTransform and co (though they are
mostly removed at *.dll.sources level).
SetSourceLineInfo(lineInfo);
}
+#if !DISABLE_XSLT_SCRIPT
internal XslLoadException(CompilerError error)
: base(Res.Xml_UserException, new string[] { error.ErrorText })
{
SetSourceLineInfo(new SourceLineInfo(error.FileName, errorLine, errorColumn, errorLine, errorColumn));
}
+#endif
internal void SetSourceLineInfo(ISourceLineInfo lineInfo) {
Debug.Assert(lineInfo == null || lineInfo.Uri != null);
this.stylesheet.ProcessTemplates();
this.rootAction.PorcessAttributeSets(this.rootStylesheet);
this.stylesheet.SortWhiteSpace();
+#if !DISABLE_XSLT_SCRIPT
CompileScript(evidence);
+#endif
if (evidence != null) {
this.rootAction.permissions = SecurityManager.GetStandardSandbox(evidence);
}
return "ScriptClass_" + System.Threading.Interlocked.Increment(ref scriptClassCounter);
}
+#if !DISABLE_XSLT_SCRIPT
internal void AddScript(string source, ScriptingLanguage lang, string ns, string fileName, int lineNumber) {
ValidateExtensionNamespace(ns);
}
}
}
+#endif
private static void ValidateExtensionNamespace(string nsUri) {
if (nsUri.Length == 0 || nsUri == XmlReservedNs.NsXslt) {
XmlConvert.ToUri(nsUri);
}
+#if !DISABLE_XSLT_SCRIPT
private void FixCompilerError(CompilerError e) {
foreach(string scriptFile in this.scriptFiles) {
if (e.FileName == scriptFile) {
this.stylesheet.ScriptObjectTypes.Add(ns, assembly.GetType(nsName + "." + scriptClass.Name));
}
}
+#endif
public string GetNsAlias(ref string prefix) {
Debug.Assert(
compiler.PopScope();
}
}
+#if !DISABLE_XSLT_SCRIPT
else if (nspace == input.Atoms.UrnMsxsl && name == input.Atoms.Script) {
AddScript(compiler);
}
+#endif
else {
if (nspace.Length == 0) {
throw XsltException.Create(Res.Xslt_NullNsAtTopLevel, input.Name);
lastCopyCodeAction.AddEvents(copyEvents);
}
+#if !DISABLE_XSLT_SCRIPT
private void AddScript(Compiler compiler) {
NavigatorInput input = compiler.Input;
compiler.AddScript(input.Value, lang, implementsNamespace, input.BaseURI, input.LineNumber);
input.ToParent();
}
+#endif
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
#if !SILVERLIGHT
#if !HIDE_XSL
+#if !DISABLE_XSLT_COMPILER
/// <summary>
/// Serialize the object to BinaryWriter.
/// </summary>
// bool isReadOnly;
ReadOnly = reader.ReadBoolean();
}
+#endif
#else
internal void GetObjectData(object writer) { }
internal XmlWriterSettings(object reader) { }
private bool includeDebugInformation;
private int warningLevel = -1; // -1 means not set
private bool treatWarningsAsErrors;
+#if !DISABLE_XSLT_COMPILER
private TempFileCollection tempFiles;
+#endif
public XsltSettings() { }
set { treatWarningsAsErrors = value; }
}
+#if !DISABLE_XSLT_COMPILER
internal TempFileCollection TempFiles {
get { return tempFiles; }
set { tempFiles = value; }
}
+#endif
}
}