Browse Source

2002-11-28 Sebastien Pouliot <[email protected]>

	* TODOAttribute.cs: New. Still much to do ;-)
	* XmlDsigXPathTransform.cs: Corrected to compile. Transform is non-
	functionnal.
	* XmlDsigXsltTransform.cs: Corrected to compile. Transform is non-
	functionnal.

svn path=/trunk/mcs/; revision=9242
Sebastien Pouliot 23 years ago
parent
commit
17ee63aaa8

+ 8 - 0
mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog

@@ -1,3 +1,11 @@
+2002-11-28  Sebastien Pouliot  <[email protected]>
+
+	* TODOAttribute.cs: New. Still much to do ;-)
+	* XmlDsigXPathTransform.cs: Corrected to compile. Transform is non-
+	functionnal.
+	* XmlDsigXsltTransform.cs: Corrected to compile. Transform is non-
+	functionnal.
+
 2002-11-20  Sebastien Pouliot  <[email protected]>
 
 	* DataObject.cs: New. Complete implementation.

+ 37 - 0
mcs/class/System.Security/System.Security.Cryptography.Xml/TODOAttribute.cs

@@ -0,0 +1,37 @@
+//
+// TODOAttribute.cs
+//
+// Author:
+//   Ravi Pratap ([email protected])
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+namespace System {
+
+	/// <summary>
+	///   The TODO attribute is used to flag all incomplete bits in our class libraries
+	/// </summary>
+	///
+	/// <remarks>
+	///   Use this to decorate any element which you think is not complete
+	/// </remarks>
+	[AttributeUsage (AttributeTargets.All, AllowMultiple=true)]
+	public class MonoTODOAttribute : Attribute {
+
+		private string comment;
+		
+		public MonoTODOAttribute ()
+		{}
+
+		public MonoTODOAttribute (string comment)
+		{
+			this.comment = comment;
+		}
+
+		public string Comment
+		{
+			get { return comment; }
+		}
+	}
+}

+ 6 - 5
mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXPathTransform.cs

@@ -1,5 +1,6 @@
 //
-// XmlDsigXPathTransform.cs - XmlDsigXPathTransform implementation for XML Signature
+// XmlDsigXPathTransform.cs - 
+//	XmlDsigXPathTransform implementation for XML Signature
 // http://www.w3.org/TR/1999/REC-xpath-19991116 
 //
 // Author:
@@ -8,6 +9,7 @@
 // (C) 2002 Motus Technologies Inc. (http://www.motus.com)
 //
 
+using System.IO;
 using System.Security.Cryptography;
 using System.Text;
 using System.Xml;
@@ -60,7 +62,7 @@ public class XmlDsigXPathTransform : Transform {
 
 	public override object GetOutput () 
 	{
-		return xpathList;
+		return xpathNodes;
 	}
 
 	public override object GetOutput (Type type) 
@@ -89,13 +91,12 @@ public class XmlDsigXPathTransform : Transform {
 		}
 		else if (obj is XmlNodeList) {
 			xnl = (XmlNodeList) obj;
-			xsl.Load (obj);
 		}
 
 		if (xn != null) {
-			string xpath = xel.InnerXml;
+			string xpath = xn.InnerXml;
 			// only possible output: XmlNodeList
-			xpathNodes = doc.SelectNodes (xpath);
+			xpathNodes = xnl[0].SelectNodes (xpath);
 		}
 		else
 			xpathNodes = null;

+ 4 - 4
mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXsltTransform.cs

@@ -85,12 +85,12 @@ public class XmlDsigXsltTransform : Transform {
 	[MonoTODO()]
 	public override void LoadInput (object obj) 
 	{
-		// possible input: Stream, XmlDocument, and XmlNodeList
 		XslTransform xsl = new XslTransform ();
+		XmlDocument doc = new XmlDocument ();
 		Stream stream = null;
 
+		// possible input: Stream, XmlDocument, and XmlNodeList
 		if (obj is Stream) {
-			XmlDocument doc = new XmlDocument ();
 			doc.Load (obj as Stream);
 			xsl.Load (doc);
 		}
@@ -99,13 +99,13 @@ public class XmlDsigXsltTransform : Transform {
 		}
 		else if (obj is XmlNodeList) {
 //			xnl = (XmlNodeList) obj;
-//			xsl.Load (obj);
+//			xsl.Load (obj a);
 		}
 
 		if (xnl != null) {
 			stream = new MemoryStream ();
 			// only possible output: Stream
-			xsl.Transform (xnl, null, stream);
+			xsl.Transform (doc, null, stream);
 		}
 
 		if (stream != null)