Ignore:
Timestamp:
02/27/09 11:53:25 (3 years ago)
Author:
sam
Message:

dataFormWebTransf & textWebTransf : ajout de @cropTo sur sm:fieldValueString et sm:urlText

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/common.xsl.xsl

    r12321 r12894  
    101101        <xsl0:template match="sm:fieldValueString" mode="string"> 
    102102                <xsl0:choose> 
    103                                 <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
    104                                 <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     103                        <xsl0:when test="string-length(@cropTo)>0"> 
     104                                <xsl:variable name="vTxt"> 
     105                                        <xsl0:choose> 
     106                                                        <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
     107                                                        <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     108                                        </xsl0:choose> 
     109                                </xsl:variable>                  
     110                                <xsl:value-of select="si(string-length($vTxt)>{@cropTo},concat(substring($vTxt,1,{@cropTo}),'…'),$vTxt)"/></xsl0:when> 
     111                        <xsl0:otherwise> 
     112                                <xsl0:choose> 
     113                                                <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
     114                                                <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     115                                </xsl0:choose> 
     116                        </xsl0:otherwise> 
    105117                </xsl0:choose> 
    106118        </xsl0:template> 
Note: See TracChangeset for help on using the changeset viewer.