Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2005-06-27 12:31:32 +0400
committerAtsushi Eno <atsushieno@gmail.com>2005-06-27 12:31:32 +0400
commitb89eb4369599895b5a5505ea80f0af990a95da44 (patch)
tree399e344fb62bd2d56761a8d0a1b78ca42a4d101f /mcs/class/System.XML/System.Xml.Xsl
parent2a708566efcf98dd31473422037398ae4c4a5acf (diff)
2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
* XsltSettings.cs, XsltMessageEncounteredEventArgs.cs, XsltMessageEncounteredEventHandler.cs : new files for net_2_0. * XsltArgumentList.cs : added 2.0 message event. svn path=/trunk/mcs/; revision=46536
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Xsl')
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/ChangeLog7
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/XsltArgumentList.cs8
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventArgs.cs50
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventHandler.cs36
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/XsltSettings.cs87
5 files changed, 188 insertions, 0 deletions
diff --git a/mcs/class/System.XML/System.Xml.Xsl/ChangeLog b/mcs/class/System.XML/System.Xml.Xsl/ChangeLog
index 7810dd084c2..a920061e1a5 100644
--- a/mcs/class/System.XML/System.Xml.Xsl/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Xsl/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XsltSettings.cs,
+ XsltMessageEncounteredEventArgs.cs,
+ XsltMessageEncounteredEventHandler.cs : new files for net_2_0.
+ * XsltArgumentList.cs : added 2.0 message event.
+
2005-04-03 Ben Maurer <bmaurer@ximian.com>
* *.cs: Kill unmanaged xslt and the multiplexing hack.
diff --git a/mcs/class/System.XML/System.Xml.Xsl/XsltArgumentList.cs b/mcs/class/System.XML/System.Xml.Xsl/XsltArgumentList.cs
index 0b8d79d7f25..080f0c56e5f 100644
--- a/mcs/class/System.XML/System.Xml.Xsl/XsltArgumentList.cs
+++ b/mcs/class/System.XML/System.Xml.Xsl/XsltArgumentList.cs
@@ -50,6 +50,14 @@ namespace System.Xml.Xsl
#endregion
+ #region Event
+#if NET_2_0
+
+ public event XsltMessageEncounteredEventHandler XsltMessageEncountered;
+
+#endif
+ #endregion
+
#region Methods
public void AddExtensionObject (string namespaceUri, object extension)
diff --git a/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventArgs.cs b/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventArgs.cs
new file mode 100644
index 00000000000..aec95af4ddb
--- /dev/null
+++ b/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventArgs.cs
@@ -0,0 +1,50 @@
+//
+// XsltMessageEncounteredEventArgs.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2005, Novell Inc,
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_2_0
+
+using System;
+
+namespace System.Xml.Xsl
+{
+ public class XsltMessageEncounteredEventArgs : EventArgs
+ {
+ string message;
+
+ public string Message {
+ get { return message; }
+ }
+
+ internal XsltMessageEncounteredEventArgs (string message)
+ {
+ this.message = message;
+ }
+ }
+}
+#endif
diff --git a/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventHandler.cs b/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventHandler.cs
new file mode 100644
index 00000000000..5ba123ec9bf
--- /dev/null
+++ b/mcs/class/System.XML/System.Xml.Xsl/XsltMessageEncounteredEventHandler.cs
@@ -0,0 +1,36 @@
+//
+// XsltMessageEncounteredEventHandler.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2005 Novell Inc,
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_2_0
+namespace System.Xml.Xsl
+{
+ public delegate void XsltMessageEncounteredEventHandler (
+ Object sender, XsltMessageEncounteredEventArgs e);
+}
+#endif
diff --git a/mcs/class/System.XML/System.Xml.Xsl/XsltSettings.cs b/mcs/class/System.XML/System.Xml.Xsl/XsltSettings.cs
new file mode 100644
index 00000000000..33a02168212
--- /dev/null
+++ b/mcs/class/System.XML/System.Xml.Xsl/XsltSettings.cs
@@ -0,0 +1,87 @@
+//
+// XsltSettings.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2005 Novell Inc,
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_2_0
+namespace System.Xml.Xsl
+{
+ public class XsltSettings
+ {
+ static readonly XsltSettings defaultSettings;
+ static readonly XsltSettings trustedXslt;
+
+ static XsltSettings ()
+ {
+ defaultSettings = new XsltSettings (true);
+ trustedXslt = new XsltSettings (true);
+ trustedXslt.enableDocument = true;
+ trustedXslt.enableScript = true;
+ }
+
+ public static XsltSettings Default {
+ get { return defaultSettings; }
+ }
+
+ public static XsltSettings TrustedXslt {
+ get { return trustedXslt; }
+ }
+
+ bool readOnly;
+ bool enableDocument;
+ bool enableScript;
+
+ public XsltSettings ()
+ : this (false)
+ {
+ }
+
+ private XsltSettings (bool readOnly)
+ {
+ this.readOnly = readOnly;
+ }
+
+ public bool EnableDocumentFunction {
+ get { return enableDocument; }
+ set {
+ if (!readOnly)
+ enableDocument = value;
+ // otherwise silently ignored.
+ }
+ }
+
+ public bool EnableScript {
+ get { return enableScript; }
+ set {
+ if (!readOnly)
+ enableScript = value;
+ // otherwise silently ignored.
+ }
+ }
+ }
+}
+#endif