joerg       2004/05/13 10:55:22

  Modified:    src/blocks/forms/samples/resources
                        forms-calendar-styling.xsl
  Log:
  fixed template selection for date styling
  
  Revision  Changes    Path
  1.7       +8 -4      
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- forms-calendar-styling.xsl        14 Apr 2004 19:32:47 -0000      1.6
  +++ forms-calendar-styling.xsl        13 May 2004 17:55:22 -0000      1.7
  @@ -44,15 +44,19 @@
     </xsl:template>
   
     <!--+
  -      | fi:field with @type 'date' : use CalendarPopup
  +      | fi:field with either
  +      | - explicit styling @type = 'date' or
  +      | - implicit if no styling @type is specified,
  +      |   but datatype @type = 'date', selection lists must be excluded here
         +-->
  -  <xsl:template 
match="fi:field[fi:datatype/@type='date'][not(fi:selection-list)]">
  +  <xsl:template match="fi:field[fi:styling/@type='date'] |
  +                       fi:field[not(fi:styling/@type)][fi:[EMAIL 
PROTECTED]'date']][not(fi:selection-list)]">
       <xsl:variable name="id" select="generate-id()"/>
       
       <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 test="fi:[EMAIL PROTECTED]'date']/fi:convertor/@pattern">
  +          <xsl:value-of select="fi:[EMAIL 
PROTECTED]'date']/fi:convertor/@pattern"/>
           </xsl:when>
           <xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
         </xsl:choose>
  
  
  

Reply via email to