[mapguide-commits] r4911 - in sandbox/maestro-2.5: Maestro Maestro.Base/Editor Maestro.Editors Maestro.Editors/Generic Maestro.Editors/Properties Maestro.Editors/Resources MaestroBaseTests OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 19 06:21:58 EDT 2010


Author: jng
Date: 2010-05-19 06:21:57 -0400 (Wed, 19 May 2010)
New Revision: 4911

Added:
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.Designer.cs
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.cs
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.resx
   sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-2701.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve-180-left.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/clipboard-paste.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/edit-indent.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/exclamation.png
   sandbox/maestro-2.5/Maestro.Editors/Resources/scissors-blue.png
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Resource/ResourceSchemaChain.cs
Modified:
   sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs
   sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs
   sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.resx
   sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj
   sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.Designer.cs
   sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.resx
   sandbox/maestro-2.5/Maestro/Maestro.csproj
   sandbox/maestro-2.5/Maestro/Program.cs
   sandbox/maestro-2.5/MaestroBaseTests/MaestroBaseTests.csproj
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
Log:
This submission ports most of the XML editor functionality from the current (trunk) version of Maestro. In addition there are the following new features:

 - Support for formatting (indent) the document
 - Support for validating the document against the referenced xsd. It seems to choke somewhat on 1.0.0 LayerDefinition (probably due to some oversight in the 1.0.0 spec). I might consider using the original method instead.

The ICSharpCode.TextEditor is replaced by a vanilla TextBox. While the component is leaps and bounds ahead of what we currently have, most of the functionality is "nice to have" and there's always the Mono support question. So this component may be removed in the near future. 

Modified: sandbox/maestro-2.5/Maestro/Maestro.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro/Maestro.csproj	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro/Maestro.csproj	2010-05-19 10:21:57 UTC (rev 4911)
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{E0C36475-2B70-4F6D-ACE0-8943167806DC}</ProjectGuid>
     <OutputType>WinExe</OutputType>
@@ -54,6 +54,78 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
     </Compile>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\ApplicationDefinition-1.0.0.xsd">
+      <Link>ApplicationDefinition-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\DrawingSource-1.0.0.xsd">
+      <Link>DrawingSource-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\FeatureSource-1.0.0.xsd">
+      <Link>FeatureSource-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LayerDefinition-1.0.0.xsd">
+      <Link>LayerDefinition-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LayerDefinition-1.1.0.xsd">
+      <Link>LayerDefinition-1.1.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LayerDefinition-1.2.0.xsd">
+      <Link>LayerDefinition-1.2.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LayerDefinition-1.3.0.xsd">
+      <Link>LayerDefinition-1.3.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LoadProcedure-1.0.0.xsd">
+      <Link>LoadProcedure-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LoadProcedure-1.1.0.xsd">
+      <Link>LoadProcedure-1.1.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\LoadProcedure-2.2.0.xsd">
+      <Link>LoadProcedure-2.2.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\MapDefinition-1.0.0.xsd">
+      <Link>MapDefinition-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\PlatformCommon-1.0.0.xsd">
+      <Link>PlatformCommon-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\PrintLayout-1.0.0.xsd">
+      <Link>PrintLayout-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\SymbolDefinition-1.0.0.xsd">
+      <Link>SymbolDefinition-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\SymbolDefinition-1.1.0.xsd">
+      <Link>SymbolDefinition-1.1.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\SymbolLibrary-1.0.0.xsd">
+      <Link>SymbolLibrary-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\WebLayout-1.0.0.xsd">
+      <Link>WebLayout-1.0.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\WebLayout-1.1.0.xsd">
+      <Link>WebLayout-1.1.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
     <None Include="Maestro.sh">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>

Modified: sandbox/maestro-2.5/Maestro/Program.cs
===================================================================
--- sandbox/maestro-2.5/Maestro/Program.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro/Program.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -27,6 +27,7 @@
 using ICSharpCode.Core.Services;
 using Maestro.Base.UI;
 using OSGeo.MapGuide.MaestroAPI;
+using ICSharpCode.Core.WinForms;
 
 namespace Maestro
 {
@@ -46,7 +47,9 @@
 
             // Logging service by default uses System.Diagnostics.Debug. Re-route this
             // to our writer
+            var wfmsg = WinFormsMessageService.Instance;
             ServiceManager.LoggingService = new TextWriterLoggingService(btw);
+            ServiceManager.MessageService = wfmsg;
 
             // The LoggingService is a small wrapper around log4net.
             // Our application contains a .config file telling log4net to write
@@ -108,7 +111,7 @@
             // Workbench is our class from the base project, this method creates an instance
             // of the main form.
             Workbench.InitializeWorkbench();
-
+            
             try
             {
                 LoggingService.Info("Running application...");

Modified: sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.Designer.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -28,18 +28,40 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.editor = new Maestro.Editors.Generic.XmlEditorCtrl();
+            this.panelBody.SuspendLayout();
             this.SuspendLayout();
             // 
+            // panelBody
+            // 
+            this.panelBody.Controls.Add(this.editor);
+            this.panelBody.Size = new System.Drawing.Size(584, 425);
+            // 
+            // editor
+            // 
+            this.editor.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.editor.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.editor.Location = new System.Drawing.Point(0, 0);
+            this.editor.Name = "editor";
+            this.editor.Size = new System.Drawing.Size(584, 425);
+            this.editor.TabIndex = 0;
+            this.editor.TextColor = System.Drawing.SystemColors.WindowText;
+            this.editor.TextFont = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.editor.XmlContent = "";
+            // 
             // XmlEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Name = "XmlEditor";
             this.Size = new System.Drawing.Size(584, 464);
+            this.panelBody.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
 
         #endregion
+
+        private Maestro.Editors.Generic.XmlEditorCtrl editor;
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Base/Editor/XmlEditor.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -27,35 +27,29 @@
 using Maestro.Editors.Generic;
 using System.IO;
 using OSGeo.MapGuide.MaestroAPI.Resource;
+using ICSharpCode.Core;
 
 namespace Maestro.Base.Editor
 {
     public partial class XmlEditor : EditorContentBase
     {
-        //We have to do it this way because VS is stupid and can't detect
-        //the ICSharpCode.TextEditor dependency in the form designer
-
-        private XmlEditorCtrl _editor;
-
         public XmlEditor()
         {
             InitializeComponent();
-            _editor = new XmlEditorCtrl();
-            _editor.Dock = DockStyle.Fill;
-            panelBody.Controls.Add(_editor);
         }
 
         protected override void Bind(OSGeo.MapGuide.MaestroAPI.Resource.IResource value)
         {
-            _editor.XmlContent = value.Serialize();
+            //HACK: Scrub out junk <ExtendedData1> elements.
+            editor.XmlContent = value.Serialize().Replace("<ExtendedData1 />", "");
 
             this.Title = "XML Editor: " + ResourceIdentifier.GetName(value.ResourceID); //LOCALIZE
         }
 
         public string XmlContent
         {
-            get { return _editor.XmlContent; }
-            set { _editor.XmlContent = value; }
+            get { return editor.XmlContent; }
+            set { editor.XmlContent = value; }
         }
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -28,19 +28,196 @@
         /// </summary>
         private void InitializeComponent()
         {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XmlEditorCtrl));
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnUndo = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+            this.btnCopy = new System.Windows.Forms.ToolStripButton();
+            this.btnCut = new System.Windows.Forms.ToolStripButton();
+            this.btnPaste = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+            this.btnFormat = new System.Windows.Forms.ToolStripButton();
+            this.btnValidate = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+            this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
+            this.txtFind = new System.Windows.Forms.ToolStripTextBox();
+            this.btnFindNext = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
+            this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
+            this.txtReplace = new System.Windows.Forms.ToolStripTextBox();
+            this.btnReplaceAll = new System.Windows.Forms.ToolStripButton();
+            this.lblCursorPos = new System.Windows.Forms.ToolStripLabel();
+            this.txtXmlContent = new System.Windows.Forms.TextBox();
             this.resourceDataCtrl1 = new Maestro.Editors.Generic.ResourceDataCtrl();
-            this.txtEditor = new ICSharpCode.TextEditor.TextEditorControl();
+            this.toolStrip1.SuspendLayout();
             this.SuspendLayout();
             // 
             // toolStrip1
             // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnUndo,
+            this.toolStripSeparator1,
+            this.btnCopy,
+            this.btnCut,
+            this.btnPaste,
+            this.toolStripSeparator2,
+            this.btnFormat,
+            this.btnValidate,
+            this.toolStripSeparator3,
+            this.toolStripLabel1,
+            this.txtFind,
+            this.btnFindNext,
+            this.toolStripSeparator4,
+            this.toolStripLabel3,
+            this.txtReplace,
+            this.btnReplaceAll,
+            this.lblCursorPos});
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);
             this.toolStrip1.Name = "toolStrip1";
-            this.toolStrip1.Size = new System.Drawing.Size(565, 25);
+            this.toolStrip1.Size = new System.Drawing.Size(629, 25);
             this.toolStrip1.TabIndex = 0;
             this.toolStrip1.Text = "toolStrip1";
             // 
+            // btnUndo
+            // 
+            this.btnUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnUndo.Image = global::Maestro.Editors.Properties.Resources.arrow_curve_180_left;
+            this.btnUndo.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnUndo.Name = "btnUndo";
+            this.btnUndo.Size = new System.Drawing.Size(23, 22);
+            this.btnUndo.Text = "Undo";
+            this.btnUndo.Click += new System.EventHandler(this.btnUndo_Click);
+            // 
+            // toolStripSeparator1
+            // 
+            this.toolStripSeparator1.Name = "toolStripSeparator1";
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            // 
+            // btnCopy
+            // 
+            this.btnCopy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnCopy.Image = global::Maestro.Editors.Properties.Resources.document_copy;
+            this.btnCopy.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnCopy.Name = "btnCopy";
+            this.btnCopy.Size = new System.Drawing.Size(23, 22);
+            this.btnCopy.Text = "Copy";
+            // 
+            // btnCut
+            // 
+            this.btnCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnCut.Image = global::Maestro.Editors.Properties.Resources.scissors_blue;
+            this.btnCut.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnCut.Name = "btnCut";
+            this.btnCut.Size = new System.Drawing.Size(23, 22);
+            this.btnCut.Text = "Cut";
+            // 
+            // btnPaste
+            // 
+            this.btnPaste.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnPaste.Image = global::Maestro.Editors.Properties.Resources.clipboard_paste;
+            this.btnPaste.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnPaste.Name = "btnPaste";
+            this.btnPaste.Size = new System.Drawing.Size(23, 22);
+            this.btnPaste.Text = "Paste";
+            // 
+            // toolStripSeparator2
+            // 
+            this.toolStripSeparator2.Name = "toolStripSeparator2";
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
+            // 
+            // btnFormat
+            // 
+            this.btnFormat.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnFormat.Image = global::Maestro.Editors.Properties.Resources.edit_indent;
+            this.btnFormat.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnFormat.Name = "btnFormat";
+            this.btnFormat.Size = new System.Drawing.Size(23, 22);
+            this.btnFormat.Text = "Format document";
+            this.btnFormat.Click += new System.EventHandler(this.btnFormat_Click);
+            // 
+            // btnValidate
+            // 
+            this.btnValidate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+            this.btnValidate.Image = global::Maestro.Editors.Properties.Resources.tick;
+            this.btnValidate.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnValidate.Name = "btnValidate";
+            this.btnValidate.Size = new System.Drawing.Size(23, 22);
+            this.btnValidate.Text = "Validate document";
+            this.btnValidate.Click += new System.EventHandler(this.btnValidate_Click);
+            // 
+            // toolStripSeparator3
+            // 
+            this.toolStripSeparator3.Name = "toolStripSeparator3";
+            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
+            // 
+            // toolStripLabel1
+            // 
+            this.toolStripLabel1.Name = "toolStripLabel1";
+            this.toolStripLabel1.Size = new System.Drawing.Size(30, 22);
+            this.toolStripLabel1.Text = "Find";
+            // 
+            // txtFind
+            // 
+            this.txtFind.Name = "txtFind";
+            this.txtFind.Size = new System.Drawing.Size(100, 25);
+            // 
+            // btnFindNext
+            // 
+            this.btnFindNext.Image = ((System.Drawing.Image)(resources.GetObject("btnFindNext.Image")));
+            this.btnFindNext.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnFindNext.Name = "btnFindNext";
+            this.btnFindNext.Size = new System.Drawing.Size(51, 22);
+            this.btnFindNext.Text = "Next";
+            this.btnFindNext.Click += new System.EventHandler(this.btnFindNext_Click);
+            // 
+            // toolStripSeparator4
+            // 
+            this.toolStripSeparator4.Name = "toolStripSeparator4";
+            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
+            // 
+            // toolStripLabel3
+            // 
+            this.toolStripLabel3.Name = "toolStripLabel3";
+            this.toolStripLabel3.Size = new System.Drawing.Size(48, 22);
+            this.toolStripLabel3.Text = "Replace";
+            // 
+            // txtReplace
+            // 
+            this.txtReplace.Name = "txtReplace";
+            this.txtReplace.Size = new System.Drawing.Size(100, 25);
+            // 
+            // btnReplaceAll
+            // 
+            this.btnReplaceAll.Image = ((System.Drawing.Image)(resources.GetObject("btnReplaceAll.Image")));
+            this.btnReplaceAll.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnReplaceAll.Name = "btnReplaceAll";
+            this.btnReplaceAll.Size = new System.Drawing.Size(85, 22);
+            this.btnReplaceAll.Text = "Replace All";
+            this.btnReplaceAll.Click += new System.EventHandler(this.btnReplaceAll_Click);
+            // 
+            // lblCursorPos
+            // 
+            this.lblCursorPos.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+            this.lblCursorPos.Name = "lblCursorPos";
+            this.lblCursorPos.Size = new System.Drawing.Size(0, 22);
+            // 
+            // txtXmlContent
+            // 
+            this.txtXmlContent.AcceptsReturn = true;
+            this.txtXmlContent.AcceptsTab = true;
+            this.txtXmlContent.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.txtXmlContent.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.txtXmlContent.Location = new System.Drawing.Point(0, 25);
+            this.txtXmlContent.Multiline = true;
+            this.txtXmlContent.Name = "txtXmlContent";
+            this.txtXmlContent.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+            this.txtXmlContent.Size = new System.Drawing.Size(629, 301);
+            this.txtXmlContent.TabIndex = 2;
+            this.txtXmlContent.WordWrap = false;
+            this.txtXmlContent.TextChanged += new System.EventHandler(this.txtXmlContent_TextChanged);
+            this.txtXmlContent.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtXmlContent_KeyUp);
+            this.txtXmlContent.MouseClick += new System.Windows.Forms.MouseEventHandler(this.txtXmlContent_MouseClick);
+            // 
             // resourceDataCtrl1
             // 
             this.resourceDataCtrl1.ContentBackgroundColor = System.Drawing.SystemColors.Control;
@@ -50,29 +227,20 @@
             this.resourceDataCtrl1.HeaderText = "Resource Data Files";
             this.resourceDataCtrl1.Location = new System.Drawing.Point(0, 326);
             this.resourceDataCtrl1.Name = "resourceDataCtrl1";
-            this.resourceDataCtrl1.Size = new System.Drawing.Size(565, 182);
+            this.resourceDataCtrl1.Size = new System.Drawing.Size(629, 182);
             this.resourceDataCtrl1.TabIndex = 1;
             // 
-            // txtEditor
-            // 
-            this.txtEditor.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.txtEditor.IsIconBarVisible = true;
-            this.txtEditor.IsReadOnly = false;
-            this.txtEditor.Location = new System.Drawing.Point(0, 25);
-            this.txtEditor.Name = "txtEditor";
-            this.txtEditor.ShowInvalidLines = true;
-            this.txtEditor.Size = new System.Drawing.Size(565, 301);
-            this.txtEditor.TabIndex = 2;
-            // 
             // XmlEditorCtrl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.Controls.Add(this.txtEditor);
+            this.Controls.Add(this.txtXmlContent);
             this.Controls.Add(this.resourceDataCtrl1);
             this.Controls.Add(this.toolStrip1);
             this.Name = "XmlEditorCtrl";
-            this.Size = new System.Drawing.Size(565, 508);
+            this.Size = new System.Drawing.Size(629, 508);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -82,6 +250,23 @@
 
         private System.Windows.Forms.ToolStrip toolStrip1;
         private ResourceDataCtrl resourceDataCtrl1;
-        private ICSharpCode.TextEditor.TextEditorControl txtEditor;
+        private System.Windows.Forms.TextBox txtXmlContent;
+        private System.Windows.Forms.ToolStripButton btnCopy;
+        private System.Windows.Forms.ToolStripButton btnCut;
+        private System.Windows.Forms.ToolStripButton btnPaste;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private System.Windows.Forms.ToolStripButton btnUndo;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+        private System.Windows.Forms.ToolStripButton btnValidate;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
+        private System.Windows.Forms.ToolStripLabel toolStripLabel1;
+        private System.Windows.Forms.ToolStripTextBox txtFind;
+        private System.Windows.Forms.ToolStripButton btnFindNext;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
+        private System.Windows.Forms.ToolStripButton btnReplaceAll;
+        private System.Windows.Forms.ToolStripLabel toolStripLabel3;
+        private System.Windows.Forms.ToolStripTextBox txtReplace;
+        private System.Windows.Forms.ToolStripLabel lblCursorPos;
+        private System.Windows.Forms.ToolStripButton btnFormat;
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -25,20 +25,261 @@
 using System.Text;
 using System.Windows.Forms;
 using ICSharpCode.TextEditor.Document;
+using System.Xml.Schema;
+using System.Xml;
+using System.IO;
 
 namespace Maestro.Editors.Generic
 {
     public partial class XmlEditorCtrl : UserControl
     {
+        private bool _ready = false;
+
         public XmlEditorCtrl()
         {
             InitializeComponent();
         }
 
+        public Color TextColor
+        {
+            get { return txtXmlContent.ForeColor; }
+            set { txtXmlContent.ForeColor = value; }
+        }
+
+        public Color BackgroundColor
+        {
+            get { return txtXmlContent.BackColor; }
+            set { txtXmlContent.BackColor = value; }
+        }
+
+        public Font TextFont
+        {
+            get { return txtXmlContent.Font; }
+            set { txtXmlContent.Font = value; }
+        }
+
+        public void ReadyForEditing()
+        {
+            _ready = true;
+        }
+
+        protected override void OnLoad(EventArgs e)
+        {
+            EvaluateCommands();
+        }
+
+        private void EvaluateCommands()
+        {
+            btnUndo.Enabled = txtXmlContent.CanUndo;
+            btnCut.Enabled = txtXmlContent.SelectionLength > 0;
+            btnCopy.Enabled = txtXmlContent.SelectionLength > 0;
+            btnPaste.Enabled = Clipboard.ContainsText();
+        }
+
         public string XmlContent
         {
-            get { return txtEditor.Text; }
-            set { txtEditor.Text = value; }
+            get { return txtXmlContent.Text; }
+            set { txtXmlContent.Text = value; FormatText(); }
         }
+
+        private void btnUndo_Click(object sender, EventArgs e)
+        {
+            txtXmlContent.Undo();
+        }
+
+        private void btnFindNext_Click(object sender, EventArgs e)
+        {
+            String szFind = txtFind.Text;
+            if (String.IsNullOrEmpty(szFind))
+            {
+                MessageBox.Show(this, Properties.Resources.FindEmptyString, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+                txtFind.Focus();
+                return;
+            }
+            FindAndReplace(szFind, null);
+        }
+
+        private void btnReplaceAll_Click(object sender, EventArgs e)
+        {
+            if (txtFind.Text.Length == 0)
+                MessageBox.Show(Properties.Resources.FindReplaceNothing);
+
+            FindAndReplace(txtFind.Text, txtReplace.Text);
+        }
+
+        private void FindAndReplace(string szFind, string szReplace)
+        {
+            var textEditor = txtXmlContent;
+
+            // find start 
+            int iStartSearching = textEditor.SelectionStart;
+            if (textEditor.SelectionLength > 0)
+                iStartSearching++;
+
+            System.Text.RegularExpressions.Regex regexThis = new System.Text.RegularExpressions.Regex(szFind, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+            System.Text.RegularExpressions.Match matchThis = regexThis.Match(textEditor.Text, iStartSearching);
+
+            // look by regex, then simple find
+            String szFindInstance = "";
+            if (matchThis.Success)
+            {
+                int iRegExStart = matchThis.Index;
+                int iRegExLength = matchThis.Length;
+
+                // TODO: this is a rubbish hack for single occurrance - there is probably a better RegEx way to find/replace
+                szFindInstance = matchThis.ToString();
+            }
+            else
+            {
+                if (textEditor.Text.IndexOf(szFind, iStartSearching, StringComparison.OrdinalIgnoreCase) < 0)
+                {
+                    MessageBox.Show(this, Properties.Resources.FindNothing, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+                    return;
+                }
+                szFindInstance = szFind;
+            }
+
+            String szHighlight;
+            if (String.IsNullOrEmpty(szReplace))
+                szHighlight = szFindInstance;
+            else
+            {
+                textEditor.Text = textEditor.Text.Replace(szFindInstance, szReplace);
+                szHighlight = szReplace;
+            }
+
+            int iFound = textEditor.Text.IndexOf(szHighlight, iStartSearching);
+            if (iFound > -1)
+            {
+                textEditor.Focus();
+                textEditor.Select(iFound, szHighlight.Length);
+                UpdateTextPosition();
+                textEditor.ScrollToCaret();
+
+                if (!String.IsNullOrEmpty(szReplace))
+                    OnContentChanged();
+            }
+        }
+
+        protected virtual void OnContentChanged()
+        {
+            if (_ready)
+            {
+                var handler = this.ContentChanged;
+                if (handler != null)
+                    handler(this, EventArgs.Empty);
+            }
+        }
+
+        public event EventHandler ContentChanged;
+
+        private void UpdateTextPosition()
+        {
+            var textEditor = txtXmlContent;
+            int line = textEditor.GetLineFromCharIndex(textEditor.SelectionStart + textEditor.SelectionLength);
+            int col = (textEditor.SelectionStart + textEditor.SelectionLength) - textEditor.GetFirstCharIndexFromLine(line);
+
+            lblCursorPos.Text = String.Format(Properties.Resources.XmlEditorCursorTemplate, line + 1, col + 1);
+        }
+
+        private void txtXmlContent_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Control && e.KeyCode == Keys.A)
+                txtXmlContent.SelectAll();
+
+            UpdateTextPosition();
+            EvaluateCommands();
+        }
+
+        private void txtXmlContent_TextChanged(object sender, EventArgs e)
+        {
+            UpdateTextPosition();
+            EvaluateCommands();
+
+            OnContentChanged();
+        }
+
+        private void txtXmlContent_MouseClick(object sender, MouseEventArgs e)
+        {
+            UpdateTextPosition();
+            EvaluateCommands();
+        }
+
+        private void btnValidate_Click(object sender, EventArgs e)
+        {
+            List<string> errors = new List<string>();
+            List<string> warnings = new List<string>();
+
+            // Set the validation settings.
+            XmlReaderSettings settings = new XmlReaderSettings();
+            settings.ValidationType = ValidationType.Schema;
+            settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessInlineSchema;
+            settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessSchemaLocation;
+            settings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings;
+            settings.ValidationEventHandler += (s, evt) =>
+            {
+                if (evt.Severity == XmlSeverityType.Error)
+                    errors.Add(evt.Message);
+                else
+                    warnings.Add(evt.Message);
+            };
+            
+            using(var ms = new MemoryStream(Encoding.UTF8.GetBytes(txtXmlContent.Text)))
+            {
+                using (var reader = XmlReader.Create(ms, settings))
+                {
+                    try
+                    {
+                        while (reader.Read()) ;
+                    }
+                    catch (XmlException ex)
+                    {
+                        errors.Add(ex.Message);
+                    }
+                }
+            }
+
+            if (errors.Count > 0 || warnings.Count > 0)
+                new XmlValidationResult(errors, warnings).Show();
+            else
+                MessageBox.Show(Properties.Resources.XmlDocIsValid);
+        }
+
+        private void btnFormat_Click(object sender, EventArgs e)
+        {
+            FormatText();
+        }
+
+        private void FormatText()
+        {
+            string content = null;
+            if (string.IsNullOrEmpty(txtXmlContent.Text.Trim()))
+                return;
+            try
+            {
+                XmlDocument doc = new XmlDocument();
+                doc.LoadXml(txtXmlContent.Text);
+
+                using (var ms = new MemoryStream())
+                {
+                    using (var sw = new StreamWriter(ms))
+                    {
+                        var writer = XmlWriter.Create(sw, new XmlWriterSettings() { Encoding = Encoding.UTF8, Indent = true });
+                        doc.Save(writer);
+
+                        content = Encoding.UTF8.GetString(ms.GetBuffer());
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
+
+            if (!string.IsNullOrEmpty(content))
+            {
+                txtXmlContent.Text = content;
+            }
+        }
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.resx	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlEditorCtrl.resx	2010-05-19 10:21:57 UTC (rev 4911)
@@ -120,4 +120,31 @@
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnFindNext.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGFSURBVDhPY2CgBbCf93Km3dwXZ2AYxCfJHtsZj89MefD/
+        f//tf/8n3///H8QnyQDLaQ/PdF7987/6+I//HVf+/AfxSTLApO/mmcazP/7n7vz0v/709/8gPkkG6Hde
+        OVN9/Ov/tE3v/lcd+/ofxCfJAK2ms2dKD378H774/v/0zU/+g/gkGaBadfRM4tq7/10mnPkfu/LOfxAf
+        rwEyhXtmyhfvO4OMI1bf+2835eL/0JV3/6PLgdSjGCiRsy1GMnvbmZyjH//7bHj+33v9s/+2Sx7+N5h1
+        57/14gf/XVc/+e+y6sn/kK0v/4PUgdRjuEgseV2MSMr6M2GHPv+XW/wSAztvf/8fJA9Sh9M7vHErY3hi
+        lp+xO/DzP9/qr3BsuOvHf5A4SJ5gYHJHLI7hCl90RmP/v/9MG//9V9rz7z+IDxInqBmmgMmmPIY1cM4Z
+        qd3//4NoEJ8YzaxARbJAbATExkxGSSVMvjPOgGgQH4qVgDQHLsOYgRL8QCwJxFI4sCBQnAXZAADCr+rk
+        1StEiAAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="btnReplaceAll.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGFSURBVDhPY2CgBbCf93Km3dwXZ2AYxCfJHtsZj89MefD/
+        f//tf/8n3///H8QnyQDLaQ/PdF7987/6+I//HVf+/AfxSTLApO/mmcazP/7n7vz0v/709/8gPkkG6Hde
+        OVN9/Ov/tE3v/lcd+/ofxCfJAK2ms2dKD378H774/v/0zU/+g/gkGaBadfRM4tq7/10mnPkfu/LOfxAf
+        rwEyhXtmyhfvO4OMI1bf+2835eL/0JV3/6PLgdSjGCiRsy1GMnvbmZyjH//7bHj+33v9s/+2Sx7+N5h1
+        57/14gf/XVc/+e+y6sn/kK0v/4PUgdRjuEgseV2MSMr6M2GHPv+XW/wSAztvf/8fJA9Sh9M7vHErY3hi
+        lp+xO/DzP9/qr3BsuOvHf5A4SJ5gYHJHLI7hCl90RmP/v/9MG//9V9rz7z+IDxInqBmmgMmmPIY1cM4Z
+        qd3//4NoEJ8YzaxARbJAbATExkxGSSVMvjPOgGgQH4qVgDQHLsOYgRL8QCwJxFI4sCBQnAXZAADCr+rk
+        1StEiAAAAABJRU5ErkJggg==
+</value>
+  </data>
 </root>
\ No newline at end of file

Added: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.Designer.cs	                        (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.Designer.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -0,0 +1,105 @@
+namespace Maestro.Editors.Generic
+{
+    partial class XmlValidationResult
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.btnOK = new System.Windows.Forms.Button();
+            this.grdMessages = new System.Windows.Forms.DataGridView();
+            this.COL_ICON = new System.Windows.Forms.DataGridViewImageColumn();
+            this.COL_MESSAGE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.grdMessages)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnOK
+            // 
+            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnOK.Location = new System.Drawing.Point(560, 219);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(75, 23);
+            this.btnOK.TabIndex = 0;
+            this.btnOK.Text = "OK";
+            this.btnOK.UseVisualStyleBackColor = true;
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+            // 
+            // grdMessages
+            // 
+            this.grdMessages.AllowUserToAddRows = false;
+            this.grdMessages.AllowUserToDeleteRows = false;
+            this.grdMessages.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.grdMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.COL_ICON,
+            this.COL_MESSAGE});
+            this.grdMessages.Location = new System.Drawing.Point(13, 13);
+            this.grdMessages.Name = "grdMessages";
+            this.grdMessages.ReadOnly = true;
+            this.grdMessages.RowHeadersVisible = false;
+            this.grdMessages.Size = new System.Drawing.Size(622, 200);
+            this.grdMessages.TabIndex = 1;
+            // 
+            // COL_ICON
+            // 
+            this.COL_ICON.DataPropertyName = "Icon";
+            this.COL_ICON.HeaderText = "";
+            this.COL_ICON.Name = "COL_ICON";
+            this.COL_ICON.ReadOnly = true;
+            this.COL_ICON.Width = 40;
+            // 
+            // COL_MESSAGE
+            // 
+            this.COL_MESSAGE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.COL_MESSAGE.DataPropertyName = "Message";
+            this.COL_MESSAGE.HeaderText = "Message";
+            this.COL_MESSAGE.Name = "COL_MESSAGE";
+            this.COL_MESSAGE.ReadOnly = true;
+            // 
+            // XmlValidationResult
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(647, 254);
+            this.ControlBox = false;
+            this.Controls.Add(this.grdMessages);
+            this.Controls.Add(this.btnOK);
+            this.Name = "XmlValidationResult";
+            this.Text = "XML Validation Results";
+            ((System.ComponentModel.ISupportInitialize)(this.grdMessages)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnOK;
+        private System.Windows.Forms.DataGridView grdMessages;
+        private System.Windows.Forms.DataGridViewImageColumn COL_ICON;
+        private System.Windows.Forms.DataGridViewTextBoxColumn COL_MESSAGE;
+    }
+}
\ No newline at end of file

Added: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.cs	                        (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -0,0 +1,64 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Maestro.Editors.Generic
+{
+    public partial class XmlValidationResult : Form
+    {
+        class MessageItem
+        {
+            public Image Icon { get; set; }
+            public string Message { get; set; }
+        }
+
+        private XmlValidationResult()
+        {
+            InitializeComponent();
+        }
+
+        public XmlValidationResult(IEnumerable<string> errors, IEnumerable<string> warnings)
+            : this()
+        {
+            List<MessageItem> items = new List<MessageItem>();
+            foreach (var err in errors)
+            {
+                items.Add(new MessageItem { Icon = Properties.Resources.cross, Message = err });
+            }
+            foreach (var warn in warnings)
+            {
+                items.Add(new MessageItem { Icon = Properties.Resources.exclamation, Message = warn });
+            }
+
+            grdMessages.DataSource = items;
+        }
+
+        private void btnOK_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

Added: sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.resx	                        (rev 0)
+++ sandbox/maestro-2.5/Maestro.Editors/Generic/XmlValidationResult.resx	2010-05-19 10:21:57 UTC (rev 4911)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="COL_ICON.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="COL_MESSAGE.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file

Modified: sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Maestro.Editors.csproj	2010-05-19 10:21:57 UTC (rev 4911)
@@ -173,6 +173,12 @@
     <Compile Include="Generic\XmlEditorCtrl.Designer.cs">
       <DependentUpon>XmlEditorCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="Generic\XmlValidationResult.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Generic\XmlValidationResult.Designer.cs">
+      <DependentUpon>XmlValidationResult.cs</DependentUpon>
+    </Compile>
     <Compile Include="IEditorService.cs" />
     <Compile Include="LayerDefinition\LayerPropertiesSectionCtrl.cs">
       <SubType>UserControl</SubType>
@@ -438,6 +444,9 @@
       <DependentUpon>XmlEditorCtrl.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="Generic\XmlValidationResult.resx">
+      <DependentUpon>XmlValidationResult.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="LayerDefinition\LayerPropertiesSectionCtrl.resx">
       <DependentUpon>LayerPropertiesSectionCtrl.cs</DependentUpon>
       <SubType>Designer</SubType>
@@ -684,6 +693,27 @@
     <None Include="Resources\folder-horizontal.png" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="Resources\scissors-blue.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\clipboard-paste.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\arrow-curve.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\arrow-curve-180-left.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\arrow-2701.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\exclamation.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\edit-indent.png" />
+  </ItemGroup>
+  <ItemGroup>
     <Folder Include="DrawingSource\Preview\" />
     <Folder Include="LayerDefinition\Drawing\" />
     <Folder Include="LayerDefinition\Geometry\" />

Modified: sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.Designer.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.Designer.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -123,6 +123,20 @@
             }
         }
         
+        internal static System.Drawing.Bitmap arrow_curve {
+            get {
+                object obj = ResourceManager.GetObject("arrow-curve", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap arrow_curve_180_left {
+            get {
+                object obj = ResourceManager.GetObject("arrow-curve-180-left", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         internal static System.Drawing.Bitmap arrow_return_180 {
             get {
                 object obj = ResourceManager.GetObject("arrow-return-180", resourceCulture);
@@ -130,6 +144,13 @@
             }
         }
         
+        internal static System.Drawing.Bitmap clipboard_paste {
+            get {
+                object obj = ResourceManager.GetObject("clipboard-paste", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         internal static System.Drawing.Bitmap control {
             get {
                 object obj = ResourceManager.GetObject("control", resourceCulture);
@@ -221,6 +242,47 @@
             }
         }
         
+        internal static System.Drawing.Bitmap edit_indent {
+            get {
+                object obj = ResourceManager.GetObject("edit-indent", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        internal static System.Drawing.Bitmap exclamation {
+            get {
+                object obj = ResourceManager.GetObject("exclamation", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Cannot Find an Empty String.
+        /// </summary>
+        internal static string FindEmptyString {
+            get {
+                return ResourceManager.GetString("FindEmptyString", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Could not find specified string or end of document reached.
+        /// </summary>
+        internal static string FindNothing {
+            get {
+                return ResourceManager.GetString("FindNothing", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Nothing to replace.
+        /// </summary>
+        internal static string FindReplaceNothing {
+            get {
+                return ResourceManager.GetString("FindReplaceNothing", resourceCulture);
+            }
+        }
+        
         internal static System.Drawing.Bitmap folder_horizontal {
             get {
                 object obj = ResourceManager.GetObject("folder_horizontal", resourceCulture);
@@ -290,6 +352,13 @@
             }
         }
         
+        internal static System.Drawing.Bitmap scissors_blue {
+            get {
+                object obj = ResourceManager.GetObject("scissors-blue", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         internal static System.Drawing.Bitmap script__arrow {
             get {
                 object obj = ResourceManager.GetObject("script--arrow", resourceCulture);
@@ -368,5 +437,23 @@
                 return ResourceManager.GetString("TransparentName", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Document is valid.
+        /// </summary>
+        internal static string XmlDocIsValid {
+            get {
+                return ResourceManager.GetString("XmlDocIsValid", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Line {0}, Column {1}.
+        /// </summary>
+        internal static string XmlEditorCursorTemplate {
+            get {
+                return ResourceManager.GetString("XmlEditorCursorTemplate", resourceCulture);
+            }
+        }
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.resx	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/Maestro.Editors/Properties/Resources.resx	2010-05-19 10:21:57 UTC (rev 4911)
@@ -121,6 +121,12 @@
   <data name="sql-join-inner" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\sql-join-inner.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="FindReplaceNothing" xml:space="preserve">
+    <value>Nothing to replace</value>
+  </data>
+  <data name="globe--arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\globe--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="minus-circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\minus-circle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -133,6 +139,9 @@
   <data name="drive-upload" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\drive-upload.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="XmlDocIsValid" xml:space="preserve">
+    <value>Document is valid</value>
+  </data>
   <data name="InfiniteValue" xml:space="preserve">
     <value>infinite</value>
     <comment>A value that is displayed when the value assigned is infinite</comment>
@@ -149,9 +158,18 @@
   <data name="application-search-result" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\application-search-result.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="TransparentName" xml:space="preserve">
+    <value>Transparent</value>
+  </data>
+  <data name="script--arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\script--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="control-stop-square" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\control-stop-square.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="clipboard-paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\clipboard-paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="InvalidValueError" xml:space="preserve">
     <value>Invalid value</value>
     <comment>An error message that is displayed when the entered value is invalid</comment>
@@ -165,6 +183,18 @@
   <data name="control" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\control.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="folder_horizontal" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\folder-horizontal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="arrow-090" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\arrow-090.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="FindNothing" xml:space="preserve">
+    <value>Could not find specified string or end of document reached</value>
+  </data>
+  <data name="exclamation" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\exclamation.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="arrow-return-180" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\arrow-return-180.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -177,17 +207,14 @@
   <data name="databases-relation" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\databases-relation.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="cross-circle-frame" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\cross-circle-frame.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="MoreColorsName" xml:space="preserve">
+    <value>More colors...</value>
   </data>
-  <data name="globe--arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\globe--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
   <data name="tick-circle-frame" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\tick-circle-frame.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="script--arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\script--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="scissors-blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\scissors-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="sort-number" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\sort-number.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -195,6 +222,9 @@
   <data name="application--arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\application--arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="FindEmptyString" xml:space="preserve">
+    <value>Cannot Find an Empty String</value>
+  </data>
   <data name="arrow-270" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\arrow-270.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -207,12 +237,18 @@
   <data name="arrow-circle-135" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\arrow-circle-135.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="document--pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\document--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="cross" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\cross.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="arrow-090" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\arrow-090.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="cross-circle-frame" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\cross-circle-frame.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="arrow-curve" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\arrow-curve.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="drive-download" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\drive-download.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -228,6 +264,12 @@
   <data name="database--plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\database--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="XmlEditorCursorTemplate" xml:space="preserve">
+    <value>Line {0}, Column {1}</value>
+  </data>
+  <data name="arrow-curve-180-left" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\arrow-curve-180-left.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="sql" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\sql.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -237,16 +279,7 @@
   <data name="application-import" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\application-import.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="document--pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\document--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="edit-indent" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\edit-indent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="MoreColorsName" xml:space="preserve">
-    <value>More colors...</value>
-  </data>
-  <data name="TransparentName" xml:space="preserve">
-    <value>Transparent</value>
-  </data>
-  <data name="folder_horizontal" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\folder-horizontal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
 </root>
\ No newline at end of file

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-2701.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-2701.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve-180-left.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve-180-left.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/arrow-curve.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/clipboard-paste.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/clipboard-paste.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/edit-indent.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/edit-indent.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/exclamation.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/exclamation.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/maestro-2.5/Maestro.Editors/Resources/scissors-blue.png
===================================================================
(Binary files differ)


Property changes on: sandbox/maestro-2.5/Maestro.Editors/Resources/scissors-blue.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: sandbox/maestro-2.5/MaestroBaseTests/MaestroBaseTests.csproj
===================================================================
--- sandbox/maestro-2.5/MaestroBaseTests/MaestroBaseTests.csproj	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/MaestroBaseTests/MaestroBaseTests.csproj	2010-05-19 10:21:57 UTC (rev 4911)
@@ -44,12 +44,6 @@
     <Reference Include="System" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml.Linq">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data.DataSetExtensions">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>

Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2010-05-19 10:21:57 UTC (rev 4911)
@@ -213,6 +213,7 @@
     <Compile Include="Resource\IResource.cs" />
     <Compile Include="Resource\IVersionedEntity.cs" />
     <Compile Include="Resource\ResourceIdentifier.cs" />
+    <Compile Include="Resource\ResourceSchemaChain.cs" />
     <Compile Include="Resource\ResourceTypeDescriptor.cs" />
     <Compile Include="Resource\ResourceContentVersionChecker.cs" />
     <Compile Include="Serialization\Enums.cs" />
@@ -237,62 +238,118 @@
     <Compile Include="XmlValidator.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="Schemas\ApplicationDefinition-1.0.0.xsd" />
-    <None Include="Schemas\ApplicationDefinitionInfo-1.0.0.xsd" />
-    <None Include="Schemas\BatchPropertyCollection-1.0.0.xsd" />
-    <None Include="Schemas\DataStoreList-1.0.0.xsd" />
-    <None Include="Schemas\DrawingSectionList-1.0.0.xsd" />
-    <None Include="Schemas\DrawingSectionResourceList-1.0.0.xsd" />
-    <None Include="Schemas\DrawingSource-1.0.0.xsd" />
-    <None Include="Schemas\Envelope-1.0.0.xsd" />
-    <None Include="Schemas\FdoLongTransactionList-1.0.0.xsd" />
-    <None Include="Schemas\FdoProviderCapabilities-1.0.0.xsd" />
-    <None Include="Schemas\FdoProviderCapabilities-1.1.0.xsd" />
-    <None Include="Schemas\FdoSpatialContextList-1.0.0.xsd" />
-    <None Include="Schemas\FeatureProviderRegistry-1.0.0.xsd" />
-    <None Include="Schemas\FeatureSet-1.0.0.xsd" />
-    <None Include="Schemas\FeatureSource-1.0.0.xsd" />
-    <None Include="Schemas\Group-1.0.0.xsd" />
-    <None Include="Schemas\GroupList-1.0.0.xsd" />
-    <None Include="Schemas\LayerDefinition-1.0.0.xsd" />
-    <None Include="Schemas\LayerDefinition-1.1.0.xsd" />
-    <None Include="Schemas\LayerDefinition-1.2.0.xsd" />
-    <None Include="Schemas\LayerDefinition-1.3.0.xsd" />
-    <None Include="Schemas\LoadProcedure-1.0.0.xsd" />
-    <None Include="Schemas\LoadProcedure-1.1.0.xsd" />
-    <None Include="Schemas\LoadProcedure-2.2.0.xsd" />
-    <None Include="Schemas\MapDefinition-1.0.0.xsd" />
-    <None Include="Schemas\PlatformCommon-1.0.0.xsd" />
-    <None Include="Schemas\PrintLayout-1.0.0.xsd" />
-    <None Include="Schemas\RepositoryContent-1.0.0.xsd" />
-    <None Include="Schemas\RepositoryList-1.0.0.xsd" />
-    <None Include="Schemas\ResourceDataList-1.0.0.xsd" />
-    <None Include="Schemas\ResourceDocumentHeader-1.0.0.xsd" />
-    <None Include="Schemas\ResourceFolderHeader-1.0.0.xsd" />
-    <None Include="Schemas\ResourceList-1.0.0.xsd" />
-    <None Include="Schemas\ResourcePackageManifest-1.0.0.xsd" />
-    <None Include="Schemas\ResourceReferenceList-1.0.0.xsd" />
-    <None Include="Schemas\ResourceSecurity-1.0.0.xsd" />
-    <None Include="Schemas\Role-1.0.0.xsd" />
-    <None Include="Schemas\SelectAggregate-1.0.0.xsd" />
-    <None Include="Schemas\Server-1.0.0.xsd" />
-    <None Include="Schemas\ServerList-1.0.0.xsd" />
-    <None Include="Schemas\SiteInformation-1.0.0.xsd" />
-    <None Include="Schemas\SiteInformation-2.2.0.xsd" />
-    <None Include="Schemas\SiteStatus-2.2.0.xsd" />
-    <None Include="Schemas\SiteVersion-1.0.0.xsd" />
-    <None Include="Schemas\SiteVersion-2.2.0.xsd" />
-    <None Include="Schemas\SqlSelect-1.0.0.xsd" />
-    <None Include="Schemas\StringCollection-1.0.0.xsd" />
-    <None Include="Schemas\SymbolDefinition-1.0.0.xsd" />
-    <None Include="Schemas\SymbolDefinition-1.1.0.xsd" />
-    <None Include="Schemas\SymbolLibrary-1.0.0.xsd" />
-    <None Include="Schemas\Types-1.0.0.xsd" />
-    <None Include="Schemas\UnmanagedDataList-1.0.0.xsd" />
-    <None Include="Schemas\User-1.0.0.xsd" />
-    <None Include="Schemas\UserList-1.0.0.xsd" />
-    <None Include="Schemas\WebLayout-1.0.0.xsd" />
-    <None Include="Schemas\WebLayout-1.1.0.xsd" />
+    <None Include="Schemas\ApplicationDefinition-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ApplicationDefinitionInfo-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\BatchPropertyCollection-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\DataStoreList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\DrawingSectionList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\DrawingSectionResourceList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\DrawingSource-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\Envelope-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FdoLongTransactionList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FdoProviderCapabilities-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FdoProviderCapabilities-1.1.0.xsd">
+    </None>
+    <None Include="Schemas\FdoSpatialContextList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FeatureProviderRegistry-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FeatureSet-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\FeatureSource-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\Group-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\GroupList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\LayerDefinition-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\LayerDefinition-1.1.0.xsd">
+    </None>
+    <None Include="Schemas\LayerDefinition-1.2.0.xsd">
+    </None>
+    <None Include="Schemas\LayerDefinition-1.3.0.xsd">
+    </None>
+    <None Include="Schemas\LoadProcedure-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\LoadProcedure-1.1.0.xsd">
+    </None>
+    <None Include="Schemas\LoadProcedure-2.2.0.xsd">
+    </None>
+    <None Include="Schemas\MapDefinition-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\PlatformCommon-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\PrintLayout-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\RepositoryContent-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\RepositoryList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceDataList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceDocumentHeader-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceFolderHeader-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourcePackageManifest-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceReferenceList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ResourceSecurity-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\Role-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SelectAggregate-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\Server-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\ServerList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SiteInformation-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SiteInformation-2.2.0.xsd">
+    </None>
+    <None Include="Schemas\SiteStatus-2.2.0.xsd">
+    </None>
+    <None Include="Schemas\SiteVersion-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SiteVersion-2.2.0.xsd">
+    </None>
+    <None Include="Schemas\SqlSelect-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\StringCollection-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SymbolDefinition-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\SymbolDefinition-1.1.0.xsd">
+    </None>
+    <None Include="Schemas\SymbolLibrary-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\Types-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\UnmanagedDataList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\User-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\UserList-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\WebLayout-1.0.0.xsd">
+    </None>
+    <None Include="Schemas\WebLayout-1.1.0.xsd">
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Content Include="ConnectionProviders.xml">

Added: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Resource/ResourceSchemaChain.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Resource/ResourceSchemaChain.cs	                        (rev 0)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/Resource/ResourceSchemaChain.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -0,0 +1,46 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace OSGeo.MapGuide.MaestroAPI.Resource
+{
+    /// <summary>
+    /// Helper class to determine the full dependency chain for a given xml schema
+    /// </summary>
+    public static class ResourceSchemaChain
+    {
+        public static string[] GetValidatingSchemas(string schema)
+        {
+            switch (schema)
+            {
+                case "LayerDefinition-1.0.0.xsd":
+                    return new string[] { schema, "PlatformCommon-1.0.0.xsd" };
+                case "LayerDefinition-1.1.0.xsd":
+                    return new string[] { schema, "SymbolDefinition-1.0.0.xsd", "PlatformCommon-1.0.0.xsd" };
+                case "LayerDefinition-1.2.0.xsd":
+                case "LayerDefinition-1.3.0.xsd":
+                    return new string[] { schema, "SymbolDefinition-1.1.0.xsd", "PlatformCommon-1.0.0.xsd" };
+            }
+            return new string[] { schema, "PlatformCommon-1.0.0.xsd" };
+        }
+    }
+}

Modified: sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs
===================================================================
--- sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2010-05-19 07:55:21 UTC (rev 4910)
+++ sandbox/maestro-2.5/OSGeo.MapGuide.MaestroAPI/ResourceTypeRegistry.cs	2010-05-19 10:21:57 UTC (rev 4911)
@@ -34,6 +34,7 @@
 using OSGeo.MapGuide.MaestroAPI.Exceptions;
 using System.Xml;
 using OSGeo.MapGuide.MaestroAPI.ObjectModels;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
 
 namespace OSGeo.MapGuide.MaestroAPI
 {
@@ -79,7 +80,7 @@
                 new ResourceSerializer()
                 {
                     Serialize = (res) => { return res.SerializeToStream(); },
-                    Deserialize = (xml) => { return ApplicationDefinitionType.Deserialize(xml); }
+                    Deserialize = (xml) => { return FeatureSourceType.Deserialize(xml); }
                 });
 
             //LayerDefinition 1.0.0



More information about the mapguide-commits mailing list