note 76132 added to ref.xsl

From: Date: Mon, 02 Jul 2007 06:02:20 +0000
Subject: note 76132 added to ref.xsl
Groups: php.notes 
Request: Send a blank email to php-notes+get-128150@lists.php.net to get a copy of this message
Here are a couple useful tips for those who care about cross-browser compatibility. Given: <script type="text/javascript" src="test.js"></script> XSLT will automatically condense it to: <script type="text/javascript" src="test.js"/> While this is good, Internet Explorer breaks on empty script tags. So, the simple solution is to add something to prevent an empty tag. For example: <script type="text/javascript" src="test.js"><xsl:comment/></script> Produces: <script type="text/javascript" src="test.js"> </script> ------------------------ Also, here is a way to use IE's conditional comments: <xsl:comment>[if gte IE 5]&#62; &#60;link rel="stylesheet" type="text/css" href="ie.css" /&#62; &#60;![endif]</xsl:comment> Produces: <!--[if gte IE 5]> <link rel="stylesheet" type="text/css" href="ie.css" /> <![endif]--> This will let you isolate IE-related CSS without needing to use ugly CSS hacks. ---- Server IP: 208.69.120.35 Probable Submitter: 71.112.25.40 ---- Manual Page -- http://www.php.net/manual/en/ref.xsl.php Edit -- https://master.php.net/note/edit/76132 Del: integrated -- https://master.php.net/note/delete/76132/integrated Del: useless -- https://master.php.net/note/delete/76132/useless Del: bad code -- https://master.php.net/note/delete/76132/bad+code Del: spam -- https://master.php.net/note/delete/76132/spam Del: non-english -- https://master.php.net/note/delete/76132/non-english Del: in docs -- https://master.php.net/note/delete/76132/in+docs Del: other reasons-- https://master.php.net/note/delete/76132 Reject -- https://master.php.net/note/reject/76132 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128150) next »