-/**\r
- * Namespace: System.Web.UI.WebControls\r
- * Class: Xml\r
- *\r
- * Author: Gaurav Vaish, Gonzalo Paniagua Javier\r
- * Maintainer: gvaish@iitk.ac.in\r
- * Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>, <gonzalo@ximian.com>\r
- * Implementation: yes\r
- * Status: 95%\r
- *\r
- * (C) Gaurav Vaish (2002)\r
- * (c) 2002 Ximian, Inc. (http://www.ximian.com)\r
- */\r
+//
+// System.Web.UI.WebControls.Xml.cs
+//
+// Authors:
+// Gaurav Vaish (gvaish@iitk.ac.in)
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (c) 2002 Ximian, Inc. (http://www.ximian.com)
+// (C) Gaurav Vaish (2002)
+// (C) 2003 Andreas Nahr
+//\r
\r
using System;\r
-using System.ComponentModel;\r
+using System.ComponentModel;
+using System.ComponentModel.Design;\r
using System.IO;\r
using System.Xml;\r
using System.Xml.Xsl;\r
namespace System.Web.UI.WebControls\r
{\r
[DefaultProperty("DocumentSource")]\r
- [PersistChildren(false)]\r
+ [PersistChildren(false)]
+ // TODO add control builder
+ //[ControlBuilder ()]
+ [Designer ("System.Web.UI.Design.WebControls.XmlDesigner, " + Consts.AssemblySystem_Design, typeof (IDesigner))]\r
public class Xml : Control\r
{\r
private XmlDocument document;\r
{\r
XmlTextReader reader = new XmlTextReader(new StringReader("<xsl:stylesheet version='1.0' " +\r
"xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>" +\r
- "<xsl:template match=\"\">" +\r
+ "<xsl:template match=\"*\">" +\r
"<xsl:copy-of select=\".\"/>" +\r
"</xsl:template>" +\r
"</xsl:stylesheet>"));\r
document.Load (documentSource);\r
}\r
}\r
-\r
+
+ [Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [WebSysDescription ("This is the XML document that is used for the XML Webcontrol.")]\r
public XmlDocument Document\r
{\r
get\r
document = value;\r
}\r
}\r
-\r
+
+ [Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [WebSysDescription ("The XML content that is transformed for the XML Webcontrol.")]\r
public string DocumentContent\r
{\r
get\r
documentContent = value;\r
}\r
}\r
-\r
+
+ [DefaultValue (""), Bindable (true), WebCategory ("Behavior")]
+ [Editor ("System.Web.UI.Design.XmlUrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
+ [WebSysDescription ("The URL or the source of the XML content that is transformed for the XML Webcontrol.")]\r
public string DocumentSource\r
{\r
get\r
documentSource = value;\r
}\r
}\r
-\r
+
+ [Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [WebSysDescription ("The XSL transform that is applied to this XML Webcontrol.")]\r
public XslTransform Transform\r
{\r
get\r
transform = value;\r
}\r
}\r
-\r
+
+ [DefaultValue (""), Bindable (true), WebCategory ("Behavior")]
+ [Editor ("System.Web.UI.Design.XmlUrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
+ [WebSysDescription ("An URL specifying the source that is used for the XSL transformation.")]\r
public string TransformSource\r
{\r
get\r
transformSource = value;\r
}\r
}\r
-\r
+
+ [Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ [WebSysDescription ("Arguments that are used by the XSL Transform.")]\r
public XsltArgumentList TransformArgumentList\r
{\r
get\r
}\r
\r
if (documentSource != null && documentSource.Length != 0) {\r
- xpathDoc = new XPathDocument (documentSource);\r
+ xpathDoc = new XPathDocument (MapPathSecure (documentSource));\r
return;\r
}\r
}\r
\r
if (transformSource != null && transformSource.Length != 0) {\r
transform = new XslTransform ();\r
- transform.Load (transformSource);\r
+ transform.Load (MapPathSecure (transformSource));\r
}\r
}\r
\r
}\r
\r
LoadTransform();\r
- if(document == null || xpathDoc == null)\r
+ if(document == null && xpathDoc == null)\r
{\r
return;\r
}\r