SF.net SVN: geonetwork:[1421] sandbox/geonetworkui/BlueNetMEST/web/ geonetwork/xsl/conversion/export/xml_xforms-common.xsl

View: New views
1 Messages — Rating Filter:   Alert me  

SF.net SVN: geonetwork:[1421] sandbox/geonetworkui/BlueNetMEST/web/ geonetwork/xsl/conversion/export/xml_xforms-common.xsl

by cabuchet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 1421
          http://geonetwork.svn.sourceforge.net/geonetwork/?rev=1421&view=rev
Author:   cabuchet
Date:     2008-07-22 07:32:20 +0000 (Tue, 22 Jul 2008)

Log Message:
-----------
Added group-type variable
Added group-type parameter to calls to 'create_add_button' template
Added xsl choose to only render an add button when the group type variable has not been set

Modified Paths:
--------------
    sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/conversion/export/xml_xforms-common.xsl

Modified: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/conversion/export/xml_xforms-common.xsl
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/conversion/export/xml_xforms-common.xsl 2008-07-22 07:30:08 UTC (rev 1420)
+++ sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/conversion/export/xml_xforms-common.xsl 2008-07-22 07:32:20 UTC (rev 1421)
@@ -41,6 +41,7 @@
   <xsl:param name="xpath-todo" select="''"/>
   <xsl:param name="xpath-done" select="''"/>
   <xsl:param name="config"/>
+  <xsl:param name="group-type"/>
 
   <xsl:variable name="doc" select="/"/>
   <xsl:variable name="grandParentName">
@@ -107,7 +108,6 @@
       <xsl:otherwise><xsl:value-of select="concat($xpath-done,'/',$first-element)"/></xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-
        <!--
        Xpath Done: <xsl:value-of select="$xpath-done"/>
        Xpath Todo: <xsl:value-of select="$xpath-todo"/>
@@ -200,6 +200,7 @@
                   <xsl:with-param name="xpath-done" select="$xpath-new-done"/>
                   <xsl:with-param name="xpath-todo" select="$xpath-new-todo"/>
                   <xsl:with-param name="config" select="$config"/>
+                  <xsl:with-param name="group-type" select="$group-type"/>
                </xsl:apply-templates>
 
               </xsl:when>
@@ -212,6 +213,7 @@
                     <xsl:with-param name="doc" select="$doc"/>
                     <xsl:with-param name="xpath-done" select="$xpath-new-done"/>
                     <xsl:with-param name="xpath-todo" select="$xpath-new-todo"/>
+                    <xsl:with-param name="group-type" select="$group-type"/>
                   </xsl:apply-templates>
                 </xsl:for-each>
               </xsl:when>
@@ -235,6 +237,7 @@
             <xsl:with-param name="child" select="$childName"/>
             <xsl:with-param name="has-selection-list" select="true()"/>
             <xsl:with-param name="repeat-id" select="$repeat-id"/>
+            <xsl:with-param name="group-type" select="$group-type"/>
           </xsl:call-template>            
         </xsl:when>
         <xsl:otherwise>
@@ -244,6 +247,7 @@
             <xsl:with-param name="parent" select="$parentName"/>
             <xsl:with-param name="child" select="$childName"/>
             <xsl:with-param name="repeat-id" select="$repeat-id"/>
+            <xsl:with-param name="group-type" select="$group-type"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
@@ -288,6 +292,7 @@
             <xsl:with-param name="child" select="$childName"/>
             <xsl:with-param name="context" select="concat('..','')"/>
             <xsl:with-param name="repeat-id" select="$repeat-id"/>
+            <xsl:with-param name="group-type" select="$group-type"/>
           </xsl:call-template>
 
       </xh:p>
@@ -307,6 +312,7 @@
   <xsl:param name="has-selection-list"/>
   <xsl:param name="context"/>
   <xsl:param name="repeat-id"/>
+  <xsl:param name="group-type"/>
 
   <xsl:variable name="nodeName">
     <xsl:choose>
@@ -349,7 +355,9 @@
           <xf:output value="instance('labels')/element[@name='{$nodeName}']/label" class="input-label"/>
         </xf:group>
         -->
-
+ <xsl:choose>
+ <xsl:when test="not($group-type = 'meta')">
+        
         <xf:group ref="{$context}[count({$child}) < {$maxVal}]">
           <xf:group ref="geonet:child[@name='{substring-after($child,':')}' and @prefix='{substring-before($child,':')}']">
 
@@ -435,6 +443,9 @@
             </xf:group>
         </xf:group>
 
+      </xsl:when>
+    </xsl:choose>
+  
 </xsl:template>
 
 <!-- Special element that have a selection list -->


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
GeoNetwork-commit mailing list
GeoNetwork-commit@...
https://lists.sourceforge.net/lists/listinfo/geonetwork-commit
LightInTheBox - Buy quality products at wholesale price