Sign In/My Account | View Cart  
advertisement

Article:
 The Vanishing Image: XHTML 2 Migration Issues
Subject: Use of Conditional Comments
Date: 2003-07-04 00:38:36
From: bryan rasmussen
Response to: Use of Conditional Comments

conditional comments has always seemed sort of an ugly hack to me, although if the focus starts to shift from IE as the development target of choice to IE as a legacy browser then they become perhaps more useful.

No Previous Message Previous Message Move up to Parent Message Up Next Message Next Message


Titles Only Titles Only Newest First
  • Use of Conditional Comments
    2003-07-05 06:58:33 James Fuller [Reply]

    +1 on that, and why build another processing idiom, when we have xslt;


    legacy html


    <html>
    <body>
    <img id="1" src="sample.jpg" alt="sample" width="100" height="100" />
    </body>
    </html>


    migration stylesheet
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0"/>


    <xsl:template match="/">
    <xsl:apply-templates/>
    </xsl:template>


    <xsl:template match="img">
    <object id="{@id}"
    type="image/jpeg"
    data="{@src}"
    width="{@width}"
    height="{@height}"/>
    </xsl:template>
    </xsl:stylesheet>


    and of course we can build in logic to manipulate as per the "if" statements.


    Personally, I see xhtml a perfect partner with xslt, and would like to see increased binding between the two.


    cheers, jim fuller


Sponsored By: