[mapguide-commits] r7914 - in trunk/Tools/Maestro: Maestro OSGeo.MapGuide.MaestroAPI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Nov 22 05:03:50 PST 2013


Author: jng
Date: 2013-11-22 05:03:49 -0800 (Fri, 22 Nov 2013)
New Revision: 7914

Modified:
   trunk/Tools/Maestro/Maestro/Maestro.csproj
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs
Log:
#2382: Fix validation error on v2.4.0 Layer Definition. Our XML validator hasn't been updated to pull in the correct xsds for this version. Also the v2.4.0 xsd files were not being copied to the output directory. This submission fixes that.

Modified: trunk/Tools/Maestro/Maestro/Maestro.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro.csproj	2013-11-22 08:34:19 UTC (rev 7913)
+++ trunk/Tools/Maestro/Maestro/Maestro.csproj	2013-11-22 13:03:49 UTC (rev 7914)
@@ -261,6 +261,10 @@
       <Link>Schemas\MapDefinition-2.3.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\MapDefinition-2.4.0.xsd">
+      <Link>Schemas\MapDefinition-2.4.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
     <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\PlatformCommon-1.0.0.xsd">
       <Link>Schemas\PlatformCommon-1.0.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -361,6 +365,10 @@
       <Link>Schemas\SymbolDefinition-1.1.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\SymbolDefinition-2.4.0.xsd">
+      <Link>Schemas\SymbolDefinition-2.4.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
     <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\SymbolLibrary-1.0.0.xsd">
       <Link>Schemas\SymbolLibrary-1.0.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -385,6 +393,10 @@
       <Link>Schemas\WatermarkDefinition-2.3.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
+    <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\WatermarkDefinition-2.4.0.xsd">
+      <Link>Schemas\WatermarkDefinition-2.4.0.xsd</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
     <None Include="..\OSGeo.MapGuide.MaestroAPI\Schemas\WebLayout-1.0.0.xsd">
       <Link>Schemas\WebLayout-1.0.0.xsd</Link>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs	2013-11-22 08:34:19 UTC (rev 7913)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/XmlValidator.cs	2013-11-22 13:03:49 UTC (rev 7914)
@@ -194,6 +194,16 @@
                         if (wmd != null)
                             xsds.Add("WatermarkDefinition-2.3.0.xsd", wmd); //NOXLATE
                     }
+                    else if (version.StartsWith("2.4.0")) //NOXLATE
+                    {
+                        var sym = GetXsd(xsdPath, "SymbolDefinition-2.4.0.xsd"); //NOXLATE
+                        if (sym != null)
+                            xsds.Add("SymbolDefinition-2.4.0.xsd", sym); //NOXLATE
+
+                        var wmd = GetXsd(xsdPath, "WatermarkDefinition-2.4.0.xsd"); //NOXLATE
+                        if (wmd != null)
+                            xsds.Add("WatermarkDefinition-2.4.0.xsd", wmd); //NOXLATE
+                    }
                 }
 
                 if (res.ResourceType == ResourceTypes.WatermarkDefinition)
@@ -205,6 +215,12 @@
                         if (sym != null)
                             xsds.Add("SymbolDefinition-1.1.0.xsd", sym); //NOXLATE
                     }
+                    else if (version.StartsWith("2.4.0"))
+                    {
+                        var sym = GetXsd(xsdPath, "SymbolDefinition-2.4.0.xsd"); //NOXLATE
+                        if (sym != null)
+                            xsds.Add("SymbolDefinition-2.4.0.xsd", sym); //NOXLATE
+                    }
                 }
 
                 if (res.ResourceType == ResourceTypes.MapDefinition)
@@ -220,6 +236,16 @@
                         if (wmd != null)
                             xsds.Add("WatermarkDefinition-2.3.0.xsd", wmd); //NOXLATE
                     }
+                    else if (version.StartsWith("2.4.0"))
+                    {
+                        var sym = GetXsd(xsdPath, "SymbolDefinition-2.4.0.xsd"); //NOXLATE
+                        if (sym != null)
+                            xsds.Add("SymbolDefinition-2.4.0.xsd", sym); //NOXLATE
+
+                        var wmd = GetXsd(xsdPath, "WatermarkDefinition-2.4.0.xsd"); //NOXLATE
+                        if (wmd != null)
+                            xsds.Add("WatermarkDefinition-2.4.0.xsd", wmd); //NOXLATE
+                    }
                 }
 
                 string xsdName = res.ResourceType.ToString() + "-" + res.ResourceVersion.ToString() + ".xsd"; //NOXLATE



More information about the mapguide-commits mailing list