joerg       2004/04/14 12:32:47

  Modified:    src/blocks/forms/samples/resources
                        forms-calendar-styling.xsl
  Log:
  fixed problem with getting a date popup instead of a selection list.
  though reliable this way might end in specifying/excluding more and more 
special cases, while it's exactly the contrary for using @priority on the 
template.
  
  Revision  Changes    Path
  1.6       +4 -3      
cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar-styling.xsl
  
  Index: forms-calendar-styling.xsl
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/samples/resources/forms-calendar-styling.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- forms-calendar-styling.xsl        10 Apr 2004 13:42:44 -0000      1.5
  +++ forms-calendar-styling.xsl        14 Apr 2004 19:32:47 -0000      1.6
  @@ -46,13 +46,14 @@
     <!--+
         | fi:field with @type 'date' : use CalendarPopup
         +-->
  -  <xsl:template match="fi:field[fi:datatype/@type='date']">
  +  <xsl:template 
match="fi:field[fi:datatype/@type='date'][not(fi:selection-list)]">
       <xsl:variable name="id" select="generate-id()"/>
       
  -    <!-- FIXME: should use the format used by the convertor -->
       <xsl:variable name="format">
         <xsl:choose>
  -        <xsl:when test="fi:datatype/fi:convertor/@pattern"><xsl:value-of 
select="fi:datatype/fi:convertor/@pattern"/></xsl:when>
  +        <xsl:when test="fi:datatype/fi:convertor/@pattern">
  +          <xsl:value-of select="fi:datatype/fi:convertor/@pattern"/>
  +        </xsl:when>
           <xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
  
  
  

Reply via email to