Changeset 12881


Ignore:
Timestamp:
02/25/09 15:44:38 (3 years ago)
Author:
sam
Message:

binaryWebTransf : ajout sm:WImage/sm:alt.

Location:
trunk/Wsp_Modeling
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/resources/binaryXhtmlTransf/xml.xed.xml

    r12798 r12881  
    173173                </element> 
    174174 
     175<!-- LIB : elem_att_co --> 
     176                <element se:id="elem_att_co" se:bind="element" se:card="?"> 
     177                        <childs> 
     178                                <se:choice se:card="*" se:show="ifExist"> 
     179                                        <se:ref se:refid="sm:fixedString"/> 
     180                                        <se:ref se:refid="sm:title"/> 
     181                                        <se:ref se:refid="sm:callBinaryMeta"/> 
     182                                        <se:ref se:refid="sm:callModel_co"/> 
     183                                </se:choice> 
     184                                <insert se:bind="current"/> 
     185                        </childs> 
     186                </element> 
     187                 
    175188<!-- LIB : sm:callBinaryMeta --> 
    176189                <element se:id="sm:callBinaryMeta" se:name="sm:callBinaryMeta" se:bind="element" forcefilled="true"> 
     
    885898                                                                                <se:ref se:refid="sm:binaryUrl_image" se:refurl="chrome://sm_modeling/content/resources/binaryXhtmlTransf/binary.xed.xml" se:show="always"/> 
    886899                                                                                <insert4all se:bind="current"> 
     900                                                                                        <se:ref se:name="sm:alt" se:refid="elem_att_co" se:card="?" se:show="ifExist" forcefilled="true" insert="collapsed"/> 
    887901                                                                                        <se:ref se:refid="sm:declareSize"/> 
    888902                                                                                        <se:ref se:refid="sm:longDesc"/> 
     
    907921                                                                                        </childs> 
    908922                                                                                </element> 
    909                                                                                 <element se:name="sm:labelTitle" se:id="sm:labelTitle" se:bind="element" se:card="?" tooltipTag="&common.widgets.wLink.labelTitle;"> 
    910                                                                                         <childs> 
    911                                                                                                 <se:choice se:card="*" se:show="ifExist"> 
    912                                                                                                         <se:ref se:refid="sm:fixedString"/> 
    913                                                                                                         <se:ref se:refid="sm:title"/> 
    914                                                                                                         <se:ref se:refid="sm:callBinaryMeta"/> 
    915                                                                                                         <se:ref se:refid="sm:callModel_co"/> 
    916                                                                                                 </se:choice> 
    917                                                                                                 <insert se:bind="current"/> 
    918                                                                                         </childs> 
    919                                                                                 </element> 
     923                                                                                <se:ref se:name="sm:labelTitle" se:refid="elem_att_co" tooltipTag="&common.widgets.wLink.labelTitle;"/> 
    920924                                                                                <element se:name="sm:link" se:bind="element" forcefilled="true" tooltipTag="&common.widgets.wLink.link;"> 
    921925                                                                                        <atts> 
     
    10111015                                                                                        </childs> 
    10121016                                                                                </element> 
    1013                                                                                 <se:ref se:refid="sm:labelTitle"/> 
     1017                                                                                <se:ref se:name="sm:labelTitle" se:refid="elem_att_co" tooltipTag="&common.widgets.wLink.labelTitle;"/> 
    10141018                                                                                <element se:name="sm:tooltip" se:bind="element" forcefilled="true"> 
    10151019                                                                                        <atts> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_binaryXhtmlTransf/widgets.xsl.xsl

    r12820 r12881  
    642642                <xsl0:variable name="vUrl">{<xsl0:apply-templates mode="getBinaryUrl" select="sm:binaryUrl"/>}</xsl0:variable> 
    643643                <xsl0:choose> 
    644                         <xsl0:when test="count(sm:linkOverImage)!=0"> 
     644                        <xsl0:when test="count(sm:linkOverImage)!= 0"> 
    645645                                <xsl0:variable name="vUrlLink">{<xsl0:apply-templates mode="getBinaryUrl" select="sm:linkOverImage/sm:binaryUrl"/>}</xsl0:variable> 
    646646                                <a href="{$vUrlLink}"> 
     
    649649                                        </xsl0:if> 
    650650                                        <img src="{$vUrl}"> 
    651                                                 <xsl0:attribute name="{si(parent::sm:link,'alt','lookForAlt')}">{resultatAgent('//fullTitleText')}</xsl0:attribute> 
     651                                                <xsl0:choose> 
     652                                                        <xsl0:when test="count(sm:alt) != 0"> 
     653                                                                <addAttribute name="{si(parent::sm:link,'alt','lookForAlt')}" filter="textOnly"><xsl0:apply-templates select="sm:alt/*" mode="content"/></addAttribute> 
     654                                                        </xsl0:when> 
     655                                                        <xsl0:otherwise> 
     656                                                                <xsl0:attribute name="{si(parent::sm:link,'alt','lookForAlt')}">{resultatAgent('//fullTitleText')}</xsl0:attribute> 
     657                                                        </xsl0:otherwise> 
     658                                                </xsl0:choose>   
    652659                                                <xsl0:call-template name="classAtt"/> 
    653660                                                <xsl0:call-template name="sizeAtts"> 
     
    661668                        <xsl0:otherwise> 
    662669                                <img src="{$vUrl}"> 
    663                                         <xsl0:attribute name="{si(parent::sm:link,'alt','lookForAlt')}">{resultatAgent('//fullTitleText')}</xsl0:attribute> 
     670                                        <xsl0:choose> 
     671                                                <xsl0:when test="count(sm:alt) != 0"> 
     672                                                        <addAttribute name="{si(parent::sm:link,'alt','lookForAlt')}" filter="textOnly"><xsl0:apply-templates select="sm:alt/*" mode="content"/></addAttribute> 
     673                                                </xsl0:when> 
     674                                                <xsl0:otherwise> 
     675                                                        <xsl0:attribute name="{si(parent::sm:link,'alt','lookForAlt')}">{resultatAgent('//fullTitleText')}</xsl0:attribute> 
     676                                                </xsl0:otherwise> 
     677                                        </xsl0:choose>   
    664678                                        <xsl0:call-template name="classAtt"/> 
    665679                                        <xsl0:call-template name="longDescAtt"/> 
     
    671685                        </xsl0:otherwise> 
    672686                </xsl0:choose> 
     687        </xsl0:template> 
     688        <xsl0:template match="sm:WImage/sm:alt/sm:title" mode="content"> 
     689                <xsl0:apply-templates select="." mode="contentTitleIn"/> 
    673690        </xsl0:template> 
    674691         
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_webSiteGenerator.xml

    r12827 r12881  
    433433        <xsl:template match="hx"><xsl:variable name="vCount" select="count(ancestor::scBlock)"/><xsl:element name="{concat('h', si($vCount &gt; 6, '6', $vCount))}"><xsl:apply-templates select="@*"/><xsl:apply-overlays/><xsl:apply-templates/></xsl:element></xsl:template> 
    434434        <xsl:template match="addAttribute"> 
    435                 <xsl:attribute name="{@name}"><xsl:choose><xsl:when test="@filter='textOnly'"><xsl:value-of select="normalize-space(.)"/></xsl:when><xsl:otherwise><redirect:serialize omit-xml-declaration="yes"><xsl:value-of select="."/></redirect:serialize></xsl:otherwise></xsl:choose></xsl:attribute> 
     435                <xsl:variable name="vAttCo"><xsl:choose><xsl:when test="@filter='textOnly'"><xsl:value-of select="normalize-space(.)"/></xsl:when><xsl:otherwise><redirect:serialize omit-xml-declaration="yes"><xsl:value-of select="."/></redirect:serialize></xsl:otherwise></xsl:choose></xsl:variable> 
     436                <xsl:choose> 
     437                        <xsl:when test="@name = 'lookForAlt'"> 
     438                                <xsl:attribute name="alt"><xsl:value-of select="si(string($vAttCo)='', ancestor::alternative/@alt, $vAttCo)" disable-output-escaping="yes"/></xsl:attribute> 
     439                        </xsl:when> 
     440                        <xsl:otherwise> 
     441                                <xsl:attribute name="{@name}"><xsl:value-of select="$vAttCo" disable-output-escaping="yes"/></xsl:attribute> 
     442                        </xsl:otherwise> 
     443                </xsl:choose> 
    436444        </xsl:template> 
    437445        ]]></source> 
Note: See TracChangeset for help on using the changeset viewer.