| 73 | | <xsl0:when test="boolean(*/sm:fromPublishedImage)"> |
| 74 | | <xsl:variable name="vInfosRes" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=img2props&unit=px')))"/> |
| 75 | | </xsl0:when> |
| 76 | | <xsl0:when test="boolean(*/sm:fromPublishedObject/@type='flash')"> |
| 77 | | <xsl:variable name="vInfosRes" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=swf2props')))"/> |
| 78 | | </xsl0:when> |
| 79 | | </xsl0:choose> |
| 80 | | <xsl0:call-template name="sizeAttWidth"/> |
| 81 | | <xsl0:call-template name="sizeAttHeight"/> |
| | 74 | <xsl0:when test="boolean(sm:size)"> |
| | 75 | <xsl:attribute name="width"><xsl:value-of select="java:getWidth($vResWebSize_{generate-id(.)})"/></xsl:attribute> |
| | 76 | <xsl:attribute name="height"><xsl:value-of select="java:getHeight($vResWebSize_{generate-id(.)})"/></xsl:attribute> |
| | 77 | </xsl0:when> |
| | 78 | <xsl0:otherwise> |
| | 79 | <xsl0:call-template name="sizeAttWidth"/> |
| | 80 | <xsl0:call-template name="sizeAttHeight"/> |
| | 81 | </xsl0:otherwise> |
| | 82 | </xsl0:choose> |
| | 130 | |
| | 131 | <!-- chooseOnBinary --> |
| | 132 | <xsl0:template match="sm:chooseOnBinary" mode="content"> |
| | 133 | <xsl:variable name="vResType_{generate-id(sm:binary)}" select="'{si(sm:binary/@outputType, sm:binary/@outputType, 'unknown')}'"/> |
| | 134 | <xsl:variable name="vResInfo_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image' or $vResType_{generate-id(sm:binary)} = 'flash', parseXml(resultatAgent('//', concat(resultatAgent('//getResUri_{generate-id(sm:binary)}'), resultatAgent('//resUriHasTransf_{generate-id(sm:binary)}'), si($vResType_{generate-id(sm:binary)} = 'image', 'transform=img2props&unit=px', 'transform=swf2props')))))"/> |
| | 135 | <xsl0:if test="sm:when[@widthOver]"> |
| | 136 | <xsl:variable name="vResInfoWidth_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image', $vResInfo_{generate-id(sm:binary)}/props/p[@cd='width'], si($vResType_{generate-id(sm:binary)} = 'flash', ($vResInfo_{generate-id(sm:binary)}/swfHeader/@x2 - $vResInfo_{generate-id(sm:binary)}/swfHeader/@x1) div 20, '0'))"/> |
| | 137 | </xsl0:if> |
| | 138 | <xsl0:if test="sm:when[@heightOver]"> |
| | 139 | <xsl:variable name="vResInfoHeight_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image', $vResInfo_{generate-id(sm:binary)}/props/p[@cd='height'], si($vResType_{generate-id(sm:binary)} = 'flash', ($vResInfo_{generate-id(sm:binary)}/swfHeader/@y2 - $vResInfo_{generate-id(sm:binary)}/swfHeader/@y1) div 20, '0'))"/> |
| | 140 | </xsl0:if> |
| | 141 | <xsl:choose> |
| | 142 | <xsl0:apply-templates mode="content"/> |
| | 143 | </xsl:choose> |
| | 144 | </xsl0:template> |
| | 145 | <xsl0:template match="sm:when" mode="content"> |
| | 146 | <xsl:when test="{concat(si(@widthOver, concat('$vResInfoWidth_', generate-id(../sm:binary), '>', @widthOver, ' or ')), si(@heightOver, concat('$vResInfoHeight_', generate-id(../sm:binary), '>', @heightOver, ' or ')), 'false()')}"> |
| | 147 | <xsl0:apply-templates mode="content"/> |
| | 148 | </xsl:when> |
| | 149 | </xsl0:template> |
| | 150 | <xsl0:template match="sm:otherwise" mode="content"> |
| | 151 | <xsl:otherwise> |
| | 152 | <xsl0:apply-templates mode="content"/> |
| | 153 | </xsl:otherwise> |
| | 154 | </xsl0:template> |
| | 165 | <xsl0:call-template name="classAtt"/> |
| | 166 | <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="contentEmbedAtts"/> |
| | 167 | <xsl0:call-template name="sizeAtts"/> |
| | 168 | </embed> |
| | 169 | </object> |
| | 170 | </xsl0:template> |
| | 171 | |
| | 172 | <!-- WFlash --> |
| | 173 | <xsl0:template match="sm:WFlash" mode="content"> |
| | 174 | <xsl0:variable name="vUrlParams"><xsl0:apply-templates select="sm:param[@type='url']" mode="urlInlineParams"/></xsl0:variable> |
| | 175 | <object codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> |
| | 176 | <xsl0:call-template name="classAtt"/> |
| | 177 | <xsl0:call-template name="sizeAtts"/> |
| | 178 | <param name="src" value="{{resultatAgent('//url_{generate-id(sm:binaryUrl)}')}}{$vUrlParams}"/> |
| | 179 | <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="content"/> |
| | 180 | <embed pluginspage="http://www.macromedia.com/go/getflash/" type="application/x-shockwave-flash" src="{{resultatAgent('//url_{generate-id(sm:binaryUrl)}')}}{$vUrlParams}"> |
| 574 | | <xsl0:call-template name="linkOptions"/><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> |
| | 612 | <xsl0:call-template name="linkOptionsXsl"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> |
| | 613 | <xsl0:with-param name="pWidthDefault"> |
| | 614 | <xsl0:choose> |
| | 615 | <xsl0:when test="sm:link/sm:WImage[sm:size]"> |
| | 616 | <xsl:value-of select="round(java:getWidth($vResWebSize_{generate-id(sm:link/sm:WImage)}))"/> |
| | 617 | </xsl0:when> |
| | 618 | <xsl0:when test="sm:link/sm:WFlash[sm:size]"> |
| | 619 | <xsl:value-of select="round(java:getWidth($vResWebSize_{generate-id(sm:link/sm:WFlash)}))"/> |
| | 620 | </xsl0:when> |
| | 621 | </xsl0:choose> |
| | 622 | </xsl0:with-param> |
| | 623 | <xsl0:with-param name="pHeightDefault"> |
| | 624 | <xsl0:choose> |
| | 625 | <xsl0:when test="sm:link/sm:WImage[sm:size]"> |
| | 626 | <xsl:value-of select="round(java:getHeight($vResWebSize_{generate-id(sm:link/sm:WImage)}))"/> |
| | 627 | </xsl0:when> |
| | 628 | <xsl0:when test="sm:link/sm:WFlash[sm:size]"> |
| | 629 | <xsl:value-of select="round(java:getHeight($vResWebSize_{generate-id(sm:link/sm:WFlash)}))"/> |
| | 630 | </xsl0:when> |
| | 631 | </xsl0:choose> |
| | 632 | </xsl0:with-param> |
| | 633 | </xsl0:call-template> |
| | 736 | <!-- sm:WFreeBlock --> |
| | 737 | <xsl0:template match="sm:WFreeBlock" mode="content"> |
| | 738 | <xsl0:apply-templates mode="content"/> |
| | 739 | </xsl0:template> |
| | 740 | <xsl0:template match="sm:WFreeBlock/sm:title" mode="content"> |
| | 741 | <xsl0:apply-templates select="." mode="contentTitleIn"/> |
| | 742 | </xsl0:template> |
| | 743 | <xsl0:template match="xhtml:*/sm:title" mode="content"> |
| | 744 | <xsl0:apply-templates select="." mode="contentTitleIn"/> |
| | 745 | </xsl0:template> |
| | 746 | <xsl0:template match="xhtml:*" mode="content"> |
| | 747 | <xsl0:element name="{local-name()}"> |
| | 748 | <xsl0:apply-templates select="@*" mode="freeAtts"/> |
| | 749 | <xsl0:apply-templates select="node()" mode="content"/> |
| | 750 | </xsl0:element > |
| | 751 | </xsl0:template> |
| | 752 | <xsl0:template match="xhtml:img" mode="content"> |
| | 753 | <img src="[![agent=//;arguments=pubres:{resultatAgent('//', concat('res:src=wsp:', @sc:refUri, ';mutabledst=', resultatAgent('//agentGenerator', 'destPathLibInSiteFolder'), '/', extractFileNameFromPath(@sc:refUri) ))}]!]" alt="{@alt}"> |
| | 754 | <xsl0:apply-templates select="@*" mode="freeAtts"/> |
| | 755 | </img> |
| | 756 | </xsl0:template> |
| | 757 | <xsl0:template match="sm:WFreeBlock//text()" mode="content"> |
| | 758 | <xsl0:if test="string-length(normalize-space(.)) > 0"><xsl0:value-of select="."/></xsl0:if> |
| | 759 | </xsl0:template> |
| | 760 | <xsl0:template match="@*" mode="freeAtts"> |
| | 761 | <xsl0:copy/> |
| | 762 | </xsl0:template> |
| | 763 | <xsl0:template match="@sc:*" mode="freeAtts"/> |
| | 764 | |