[mapguide-commits] r6241 - trunk/MgDev/Web/src/schemareport

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Nov 22 01:32:01 EST 2011


Author: sparkliu
Date: 2011-11-21 22:32:01 -0800 (Mon, 21 Nov 2011)
New Revision: 6241

Modified:
   trunk/MgDev/Web/src/schemareport/displayschema.xsl
Log:
Fix ticket 1863: schema report can't view latter class properties if there are two classes with same name

1. Create a feature source which contains two same-name classes (under different schema). 2. Try to use schema report to view schema of feature source. Two feature classes are in the list. 3. Try to expand data properties of the second one. You'll find the data properties of first one is expanded instead.

This is because the page only uses class name as ID so it will cause a problem when duplicate name exists. Fix uses schema ID as well.

Modified: trunk/MgDev/Web/src/schemareport/displayschema.xsl
===================================================================
--- trunk/MgDev/Web/src/schemareport/displayschema.xsl	2011-11-21 11:41:20 UTC (rev 6240)
+++ trunk/MgDev/Web/src/schemareport/displayschema.xsl	2011-11-22 06:32:01 UTC (rev 6241)
@@ -94,9 +94,9 @@
             <xsl:when test="$identity">
                 <!--create table for data properties-->
                 <xsl:if test="count(.//xs:element/@type) &lt; count(.//xs:element)">
-                    <h3><img src="./images/expand_pane.png"><xsl:attribute name="onclick">Toggle("Data_"+"<xsl:value-of select="$currclassname"/>")</xsl:attribute></img> <xsl:value-of select="$stringDataProperties"/></h3>
+                    <h3><img src="./images/expand_pane.png"><xsl:attribute name="onclick">Toggle("Data_"+"<xsl:call-template name="getSchemaName"><xsl:with-param name="nameSpace" select="$namespace"/></xsl:call-template>"+"_"+"<xsl:value-of select="$currclassname"/>")</xsl:attribute></img> <xsl:value-of select="$stringDataProperties"/></h3>
                     <div style="display:none">
-                        <xsl:attribute name="id">Data_<xsl:value-of select="$currclassname"/></xsl:attribute>
+                        <xsl:attribute name="id">Data_<xsl:call-template name="getSchemaName"><xsl:with-param name="nameSpace" select="$namespace"/></xsl:call-template>_<xsl:value-of select="$currclassname"/></xsl:attribute>
                         <table cellspacing="0">
                             <tr>
                                 <td class="heading"><xsl:value-of select="$stringPropertyName"/></td>
@@ -111,9 +111,9 @@
                 </xsl:if>
                 <!--create table for geometric properties-->
                 <xsl:if test=".//xs:element/@type='gml:AbstractGeometryType'">
-                    <h3><img src="./images/expand_pane.png"><xsl:attribute name="onclick">Toggle("Geom_"+"<xsl:value-of select="$currclassname"/>")</xsl:attribute></img> <xsl:value-of select="$stringGeometricProperties"/></h3>
+                    <h3><img src="./images/expand_pane.png"><xsl:attribute name="onclick">Toggle("Geom_"+"<xsl:call-template name="getSchemaName"><xsl:with-param name="nameSpace" select="$namespace"/></xsl:call-template>"+"_"+"<xsl:value-of select="$currclassname"/>")</xsl:attribute></img> <xsl:value-of select="$stringGeometricProperties"/></h3>
                     <div style="display:none">
-                        <xsl:attribute name="id">Geom_<xsl:value-of select="$currclassname"/></xsl:attribute>
+                        <xsl:attribute name="id">Geom_<xsl:call-template name="getSchemaName"><xsl:with-param name="nameSpace" select="$namespace"/></xsl:call-template>_<xsl:value-of select="$currclassname"/></xsl:attribute>
                         <table cellspacing="0"><tr>
                             <td class="data">
                                 <table class="data" cellspacing="0">



More information about the mapguide-commits mailing list