1 //------------------------------------------------------------------------------
2 // <copyright file="XsltSettings.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 // <spec>http://webdata/xml/specs/XslCompiledTransform.xml</spec>
7 //------------------------------------------------------------------------------
9 using System.CodeDom.Compiler;
11 namespace System.Xml.Xsl {
12 public sealed class XsltSettings {
13 private bool enableDocumentFunction;
14 private bool enableScript;
15 private bool checkOnly;
16 private bool includeDebugInformation;
17 private int warningLevel = -1; // -1 means not set
18 private bool treatWarningsAsErrors;
19 #if !DISABLE_XSLT_COMPILER
20 private TempFileCollection tempFiles;
23 public XsltSettings() { }
25 public XsltSettings(bool enableDocumentFunction, bool enableScript) {
26 this.enableDocumentFunction = enableDocumentFunction;
27 this.enableScript = enableScript;
30 public static XsltSettings Default {
31 get { return new XsltSettings(false, false); }
34 public static XsltSettings TrustedXslt {
35 get { return new XsltSettings(true, true); }
38 public bool EnableDocumentFunction {
39 get { return enableDocumentFunction; }
40 set { enableDocumentFunction = value; }
43 public bool EnableScript {
44 get { return enableScript; }
45 set { enableScript = value; }
48 internal bool CheckOnly {
49 get { return checkOnly; }
50 set { checkOnly = value; }
53 internal bool IncludeDebugInformation {
54 get { return includeDebugInformation; }
55 set { includeDebugInformation = value; }
58 internal int WarningLevel {
59 get { return warningLevel; }
60 set { warningLevel = value; }
63 internal bool TreatWarningsAsErrors {
64 get { return treatWarningsAsErrors; }
65 set { treatWarningsAsErrors = value; }
68 #if !DISABLE_XSLT_COMPILER
69 internal TempFileCollection TempFiles {
70 get { return tempFiles; }
71 set { tempFiles = value; }