<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/css/fallback.css" ?>
<?xml-stylesheet type="text/xsl" href="/xsl/layout.xsl" ?>
<e:CONTENT xmlns:e="http://www.echoofeden.com/schema/e" xmlns="http://www.w3.org/1999/xhtml" indexPage="false" start="5" days="31" month="March" root="DIGEST" level1="mit" level2="2007" level3="03">
	<h2 class="xslError"><a href="no-xsl/">Enter Here</a></h2>
	<e:TITLE>Mit The Destroyer’s archive for March, 2007</e:TITLE>
	<e:HTML>
		<div class="entry" id="post-232">
			<h2><a href="http://www.echoofeden.com/digest/mit/2007/03/21/top-ten-worst-puns/" rel="bookmark" title="Permanent Link to Top Ten Worst Puns…">Top Ten Worst Puns…</a> <cite><small>by Mit The Destroyer</small></cite></h2>
<ol class="reverse">
<li><strong>10.</strong> I went to a seafood disco last week… and pulled a mussel.</li>
<li><strong>09.</strong> Two antennas met on a roof, fell in love and got married. The ceremony wasn’t much, but the reception was great.</li>
<li><strong>08.</strong> A jumper cable walks into a bar. The bartender says, “I’ll serve you, but don’t start anything.”</li>
<li><strong>07.</strong> An invisible man marries an invisible woman. The kids were nothing to look at either.</li>
<li><strong>06.</strong> Patient: “I can’t stop singing ‘The Green, Green Grass of Home.’” <br/>Doctor: “That sounds like Tom Jones Syndrome.” <br/>Patient: “Is it common?”  <br/>Doctor: “It’s Not Unusual.” </li>
<li><strong>05.</strong> Two cows are standing next to each other in a field. Daisy says to Dolly, “I was artificially inseminated this morning.” “I don’t believe you”, says Dolly. “It’s true, no bull!” exclaims Daisy.</li>
<li><strong>04.</strong> Two Eskimos sitting in a kayak were chilly, so they lit a fire in the craft. It sank, proving once again that you can’t have your kayak and heat it too.</li>
<li><strong>03.</strong> A group of chess enthusiasts checked into a hotel and were standing in the lobby discussing their recent tournament victories. After about an hour, the manager came out of the office and asked them to disperse. “But why,” they asked, as they moved off. “Because”, he said, “I can’t stand chess-nuts boasting in an open foyer.”</li>
<li><strong>02.</strong> Mahatma Gandhi, as you know, walked barefoot most of the time, which produced an impressive set of calluses on his feet. He also ate very little which made him rather frail and with his odd diet, he suffered from bad breath. This made him….. A super calloused fragile mystic hexed by halitosis. </li>
</ol>
<h3> And #1 Top Ten Worst Puns for the week is…</h3>
<ol class="reverse">
<li><strong>01.</strong> And finally, there was a person who sent 10 different puns to his friends, with the hope that at least 1 of the puns would make them laugh. No pun in ten did.</li>
</ol>
		<ul class="meta">
			<li class="date">2007/03/21</li>
			<li class="time">1919</li>
			<li class="cat">
					<a href="/digest/category/humour/" title="View all posts in Humour" rel="category tag">Humour</a></li>
			<li class="cmt"> 
<a href="http://www.echoofeden.com/digest/mit/2007/03/21/top-ten-worst-puns/#comments" title="Comment on Top Ten Worst Puns…">3 Comments »</a>			</li>
		</ul>
		</div>
		<div class="entry" id="post-212">
			<h2><a href="http://www.echoofeden.com/digest/mit/2007/03/07/ie-understands-xhtml/" rel="bookmark" title="Permanent Link to So now that IE unerstands pure XHTML…">So now that IE unerstands pure XHTML…</a> <cite><small>by Mit The Destroyer</small></cite></h2>
<p>The question remains can the technique I showed in <a href="http://www.echoofeden.com/digest/mit/2007/03/06/ie-xhtml-bug/">Fix for IE’s lack of application/xhtml+xml</a> mean we can now embed other XML based formats inside the XHTML, as XML promises? The answer is, absolutely!</p>
<p>Here is a <a href="http://www.echoofeden.com/htmlTests/xhtmlFix/xhtml_svg_mathml.xhtml">XHTML, SVG, MathML example page</a>, that shows MathML and SVG embedded right along side an XHTML document. To properly view the page you will need to download these <a href="http://www.mozilla.org/projects/mathml/fonts/" rel="external">MathML Fonts</a>, and these <a href="http://www.adobe.com/svg/viewer/install/mainframed.html" title="Download Adobes SVG Plugin" rel="external">SVG</a> and <a href="http://www.dessci.com/en/products/mathplayer/download.htm" title="Download MathPlayer to display MathML in IE" rel="external">MathML</a> plugins if viewing in IE.</p>
<h3>What do we need to change to make this work?</h3>
<ol>
<li>Modify the doctype to the XHTML file</li>
<li>Modify the html tag to add the additional name-spaces</li>
<li>Add object tags to head to inform IE to use plugins to render SVG/MathML</li>
<li>Modify the xsl:stylesheet tag to include the additional name-spaces</li>
</ol>
<h4>Example of doctype,  html and head tag modifcations</h4>
<p><code><br/>
&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>
&lt;?xml-stylesheet type="text/xsl" href="svgMathMlXhtml.xsl"?&gt;<br/>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"<br/>
    "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"[<br/>
    &lt;!ENTITY % MATHML.prefixed "INCLUDE" &gt;<br/>
    &lt;!ENTITY % MATHML.prefix   "math" &gt;<br/>
    &lt;!ENTITY % SVG.prefixed "INCLUDE" &gt;<br/>
    &lt;!ENTITY % SVG.prefix "svg" &gt;<br/>
]&gt;<br/>
&lt;html<br/>
xmlns="http://www.w3.org/1999/xhtml"<br/>
xmlns:svg="http://www.w3.org/2000/svg"<br/>
xmlns:math="http://www.w3.org/1998/Math/MathML"<br/>
xml:lang="en"&gt;<br/>
&lt;head&gt;<br/>
    &lt;title&gt;Advanced Example&lt;/title&gt;<br/>
    &lt;meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /&gt;<br/>
    &lt;object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"&gt;&lt;/object&gt;<br/>
    &lt;?import namespace="svg" implementation="#AdobeSVG"?&gt;<br/>
    &lt;object id="MathPlayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"&gt;&lt;/object&gt;<br/>
    &lt;?import namespace="math" implementation="#MathPlayer"?&gt;<br/>
&lt;/head&gt;<br/>
</code></p>
<h4>Example of xsl:stylesheet modifications</h4>
<p><code><br/>
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<br/>
    xmlns="http://www.w3.org/1999/xhtml"<br/>
    xmlns:math="http://www.w3.org/1998/Math/MathML"<br/>
    xmlns:svg="http://www.w3.org/2000/svg"<br/>
    version="1.0"&gt;<br/>
    &lt;xsl:output method="xml" encoding="utf-8"/&gt;<br/>
    &lt;xsl:template match="/"&gt;<br/>
        &lt;xsl:copy-of select="node()"/&gt;<br/>
    &lt;/xsl:template&gt;<br/>
&lt;/xsl:stylesheet&gt;<br/>
</code></p>
		<ul class="meta">
			<li class="date">2007/03/07</li>
			<li class="time">1240</li>
			<li class="cat">
					<a href="/digest/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a></li>
			<li class="cmt"> 
<a href="http://www.echoofeden.com/digest/mit/2007/03/07/ie-understands-xhtml/#comments" title="Comment on So now that IE unerstands pure XHTML…">5 Comments »</a>			</li>
		</ul>
		</div>
		<div class="entry" id="post-210">
			<h2><a href="http://www.echoofeden.com/digest/mit/2007/03/06/ie-xhtml-bug/" rel="bookmark" title="Permanent Link to Fix for IE’s lack of application/xhtml+xml">Fix for IE’s lack of application/xhtml+xml</a> <cite><small>by Mit The Destroyer</small></cite></h2>
<p>Have you ever tried sending a 100% strictly compliant xhtml to IE, so that IE would use It’s xml engine to render the page? If so, you know that IE borks on it and forces you to download the xhtml file. I’m here to tell you that I’ve found a work around, that is standards compliant and gets around that limitation and forces IE to use the XML rendering engine. Two steps are required for it to work:</p>
<ol>
<li>Configure web server to send xhtml files with the mime type of application/xml</li>
<li>Then attach a XSL sheet to each xhtml file you serve to IE</li>
</ol>
<p><a href="/htmlTests/xhtmlFix/index.xhtml">Exmple File</a></p>
<h3>Example xhtml code</h3>
<p><code><br/>
&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>
&lt;?xml-stylesheet type="text/xsl" href="fixMe.xsl"?&gt;<br/>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br/>
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br/>
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;<br/>
&lt;head&gt;<br/>
	&lt;meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /&gt;<br/>
	&lt;title&gt;Simple Example &lt; /title&gt;<br/>
&lt;/head&gt;<br/>
&lt;body&gt;<br/>
	&lt;!-- xhtml code here --&gt;<br/>
&lt;body&gt;<br/>
&lt;/html&gt;<br/>
</code></p>
<h3>Required fixMe.xsl code</h3>
<p><code><br/>
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"&gt;<br/>
	&lt;xsl:output method="xml" encoding="utf-8"/&gt;<br/>
	&lt;xsl:template match="/"&gt;<br/>
		&lt;xsl:copy-of select="node()"/&gt;<br/>
	&lt;/xsl:template&gt;<br/>
&lt;/xsl:stylesheet&gt;<br/>
</code></p>
<h3>Why does this work?</h3>
<p>As far as IE is concerned you sent it a XML file, with an XSLT sheet applied to it. It’s XML rendering engine then applies the XSLT sheet which converts the XML page into an XHTML page. Without the XSLT sheet applied IE would have just showed us the source code to the page.</p>
<h3>How did you ever figure this out?</h3>
<p>I discovered this when I was developing this website, to teach myself XSLT. And knowing what I know about mime-types I figured it should work if I just changed the mime-type for XHTML from application/xhtml+xml to it’s alternate compliant mime-type of application/xml<sup><a href="http://www.w3.org/TR/xhtml-media-types/#application-xml" rel="external">1</a></sup>, seeing as IE wasn’t having any issues displaying XML files sent as application/xml.</p>
<h3>Additional Notes</h3>
<p><strong>Update:</strong> To see an example with SVG and MathML mixed in with the XHTML read <a href="http://www.echoofeden.com/digest/mit/2007/03/07/ie-understands-xhtml/">So now that IE unerstands pure XHTML…</a></p>
		<ul class="meta">
			<li class="date">2007/03/06</li>
			<li class="time">1900</li>
			<li class="cat">
					<a href="/digest/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a></li>
			<li class="cmt"> 
<a href="http://www.echoofeden.com/digest/mit/2007/03/06/ie-xhtml-bug/#comments" title="Comment on Fix for IE’s lack of application/xhtml+xml">6 Comments »</a>			</li>
		</ul>
		</div>
		<div class="entry" id="post-207">
			<h2><a href="http://www.echoofeden.com/digest/mit/2007/03/04/im-a-mac-pc-parodies/" rel="bookmark" title="Permanent Link to Some great parodies of the I’m a Mac/PC comercials">Some great parodies of the I’m a Mac/PC comercials</a> <cite><small>by Mit The Destroyer</small></cite></h2>
<p>Here are a couple of links to parodies of the I’m a Mac I’m  and I’m a PC <a href="http://movies.apple.com/getamac/ads/" rel="external">Mac commercials</a>:</p>
<ol>
<li><a href="http://www.lauriemcguinness.com/" rel="external">Video Parodies</a></li>
<li><a href="http://techdigest.tv/pcmaclinux.jpg" rel="external">PC VS MAC VS Linux</a></li>
</ol>
<p>If you haven’t yet seen the original <a href="http://movies.apple.com/getamac/ads/" rel="external">Mac commercials</a>, get off your lazy but and head over to the apple site and watch them.</p>
		<ul class="meta">
			<li class="date">2007/03/04</li>
			<li class="time">2117</li>
			<li class="cat">
					<a href="/digest/category/humour/" title="View all posts in Humour" rel="category tag">Humour</a></li>
			<li class="cmt"> 
<a href="http://www.echoofeden.com/digest/mit/2007/03/04/im-a-mac-pc-parodies/#respond" title="Comment on Some great parodies of the I’m a Mac/PC comercials">No Comments »</a>			</li>
		</ul>
		</div>
		<div class="navigation">
			<div class="alignleft"/>
			<div class="alignright"/>
		</div>
	</e:HTML>
	<e:CALENDAR><table id="wp-calendar">
    <caption>March 2007</caption>
    <thead>
    <tr>
		<th abbr="Sunday" scope="col" title="Sunday">S</th>
		<th abbr="Monday" scope="col" title="Monday">M</th>
		<th abbr="Tuesday" scope="col" title="Tuesday">T</th>
		<th abbr="Wednesday" scope="col" title="Wednesday">W</th>
		<th abbr="Thursday" scope="col" title="Thursday">T</th>
		<th abbr="Friday" scope="col" title="Friday">F</th>
		<th abbr="Saturday" scope="col" title="Saturday">S</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
		<td abbr="February" colspan="3" id="prev"><a href="http://www.echoofeden.com/digest/mit/2007/02/" title="View posts for February 2007">« Feb</a></td>
		<td class="pad"/>
		<td abbr="June" colspan="3" id="next"><a href="http://www.echoofeden.com/digest/mit/2007/06/" title="View posts for June 2007">Jun »</a></td>
    </tr>
    </tfoot>
    <tbody>
    <tr>
		<td colspan="4" class="pad"/><td>1</td><td>2</td><td>3</td>
	</tr>
	<tr>
		<td><a href="http://www.echoofeden.com/digest/mit/2007/03/04/" title="Some great parodies of the I’m a Mac/PC comercials">4</a></td><td>5</td><td><a href="http://www.echoofeden.com/digest/mit/2007/03/06/" title="Fix for IE’s lack of application/xhtml+xml">6</a></td><td><a href="http://www.echoofeden.com/digest/mit/2007/03/07/" title="So now that IE unerstands pure XHTML…">7</a></td><td>8</td><td>9</td><td>10</td>
	</tr>
	<tr>
		<td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td>
	</tr>
	<tr>
		<td>18</td><td>19</td><td>20</td><td><a href="http://www.echoofeden.com/digest/mit/2007/03/21/" title="Top Ten Worst Puns…">21</a></td><td>22</td><td>23</td><td>24</td>
	</tr>
	<tr>
		<td>25</td><td>26</td><td>27</td><td>28</td><td>29</td><td>30</td><td>31</td>
	</tr>
	</tbody>
	</table></e:CALENDAR>
	
</e:CONTENT>
