#14 XSLT for Media Object in IE5.5

closed-wont-fix
XSL (122)
5
2006-04-27
2001-07-09
No

This is the MediaObject XSLT that I created for IE 5.5
it only supports PNG and images so far.

<xsl:template match="mediaobject">
<xsl:choose>
<xsl:when test="imageobject and
imageobject/imagedata/@format = 'PNG' and not
(textobject)">
<span>
<xsl:attribute
name="style">width:1px;height:1px;filter:progid:DXImage
Transform.Microsoft.AlphaImageLoader(src='<xsl:value-
of
select="imageobject/imagedata/@fileref" />');</xsl:attr
ibute>
<img>
<xsl:attribute name="src"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
<xsl:attribute name="alt"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
<xsl:attribute name="style">filter:Alpha
(opacity=0);</xsl:attribute>
</img>
</span>
</xsl:when>
<xsl:when test="imageobject and
imageobject/imagedata/@format = 'PNG' and textobject">
<span>
<xsl:attribute
name="style">width:1px;height:1px;filter:progid:DXImage
Transform.Microsoft.AlphaImageLoader(src='<xsl:value-
of
select="imageobject/imagedata/@fileref" />');</xsl:attr
ibute>
<img>
<xsl:attribute name="src"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
<xsl:attribute name="alt"><xsl:value-of
select="textobject/phrase" /></xsl:attribute>
<xsl:attribute name="style">filter:Alpha
(opacity=0);</xsl:attribute>
</img>
</span>
</xsl:when>
<xsl:when test="imageobject and not(textobject)">
<img>
<xsl:attribute name="src"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
<xsl:attribute name="alt"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
</img>
</xsl:when>
<xsl:when test="imageobject and textobject">
<img>
<xsl:attribute name="src"><xsl:value-of
select="imageobject/imagedata/@fileref" /></xsl:attribu
te>
<xsl:attribute name="alt"><xsl:value-of
select="textobject/phrase" /></xsl:attribute>
</img>
</xsl:when>
</xsl:choose>
</xsl:template>

Discussion

  • Norman Walsh

    Norman Walsh - 2001-12-01

    Logged In: YES
    user_id=81663

    What does this code do?

     
  • Archimedes Trajano

    Logged In: YES
    user_id=55322

    This code block adds support for rendering PNG files in IE
    5.5. IE 5.5 does not support PNG files with the IMG tag
    properly (i.e., does not support alpha transperency only
    mask based transparency) however they have a PNG filter
    that does support it properly and this code uses it if PNG
    is specified.

     
  • Michael(tm) Smith

    Logged In: YES
    user_id=118135

    The DocBook XSL stylesheets don't attempt to support
    IE 5.5

     
  • Michael(tm) Smith

    • labels: 313527 --> XSL
    • assigned_to: nobody --> xmldoc
    • status: open --> closed-wont-fix
     
  • Michael(tm) Smith

    Logged In: YES
    user_id=118135

    The DocBook XSL stylesheets don't attempt to support
    IE 5.5

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks