#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    XSLT stylesheet works only in Chrome but not Firefox and IE9


    This is my XML code:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="ipcNewReleases-wip.xsl"?>
    <rss version="0.91">
    <channel>
    <title>IPC New Product Releases</title>
    <link></link>
    <description>IPC New Product announcements</description>
    <language>en-us</language>
    <image>
    <url />
    <title />
    <link />
    </image>
    <item>
    <title>March 12, 2013: MR-EXCOMP-12, IPC Executive Compensation Study for the North American Electronics Industry 2011-2012</title>
    <link></link>
    <header>MR-EXCOMP-12</header>
    <text>IPC Executive Compensation Study for the North American Electronics Industry 2011-2012</text>
    <description>This survey-based study provides comprehensive data on executives' base salaries, bonuses and other forms of compensation and benefits. It covers 12 key executive positions. The results are reported by type of company, industry segment, region and company size. The survey sample includes 41 electronics companies from North America. <br/>77 pages. Released March 2013</description>
    <memprice>$950</memprice>
    <nonmem>$1,900</nonmem>
    </item>
    </channel>
    </rss>

    Here is my XSL:
    <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="../ipcNewReleases-wip.xml" -->
    <!DOCTYPE xsl:stylesheet [
    <!ENTITY nbsp "&#160;">
    <!ENTITY copy "&#169;">
    <!ENTITY reg "&#174;">
    <!ENTITY trade "™">
    <!ENTITY mdash "—">
    <!ENTITY ldquo "“">
    <!ENTITY rdquo "”">
    <!ENTITY pound "&#163;">
    <!ENTITY yen "&#165;">
    <!ENTITY euro "€">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="./1999/XSL/Transform">
    <xslutput method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="./TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
    <xsl:template match="/">

    <html xmlns="./1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Untitled Document</title>
    </head>

    <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="12" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:12px;">
    <xsl:for-each select="rss/channel/item">
    <tr>
    <td><strong><a href="link" target="_blank" style="color:#366ac0; font-weight:bold; font-size:16px;"><xsl:value-of select="title"/></a></strong></td>
    </tr>
    <tr>
    <td>
    <a href="link" target="_blank"><xsl:value-of select="header"/></a><br/>
    <xsl:value-of select="text"/><br/><xsl:value-of select="description"/><br/>
    <strong>Member price: <xsl:value-of select="memprice"/><br/>Nonmember price: <xsl:value-of select="nonmem"/></strong></td>
    </tr>

    </xsl:for-each>

    </table>
    </body>
    </html>

    </xsl:template>
    </xsl:stylesheet>
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,866
    Rep Power
    6351
    Please define "works" and read the new user guide.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo