<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeDread Blog &#187; XML</title>
	<atom:link href="http://www.codedread.com/blog/archives/category/technology/software/web/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 02 Jan 2012 15:30:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress: XHTMLation Stalled?</title>
		<link>http://www.codedread.com/blog/archives/2008/04/23/wordpress-xhtmlation-stalled/</link>
		<comments>http://www.codedread.com/blog/archives/2008/04/23/wordpress-xhtmlation-stalled/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 19:27:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/04/23/wordpress-xhtmlation-stalled/</guid>
		<description><![CDATA[I spent some time a few weeks ago quietly trying to shore up my XHTML defenses on my WordPress install &#8211; not everyone is planning to move to Drupal just yet. I have a bunch of patches that are aging. I think three of them are &#8216;good to go&#8217; but I need someone to look [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/wordpress.svgz"><span/></object>I spent some time a few weeks ago quietly trying to shore up my <a href="http://intertwingly.net/blog/2008/02/24/XHTMLating-WordPress">XHTML defenses</a> on my <a href="http://wordpress.org/">WordPress</a> install &#8211; not everyone is <a href="http://realtech.burningbird.net/ajax/last-post/">planning to move</a> to <a href="http://drupal.org">Drupal</a> just yet.  I have a bunch of <a href="http://www.codedread.com/contrib.php#wp">patches</a> that are aging.  I think three of them are &#8216;good to go&#8217; but I need someone to look at them.  The patch for <a href="http://trac.wordpress.org/ticket/5998">Ticket 5998</a> needs some work to make it applicable across trackbacks and pingbacks as well as ensuring it is applicable only for UTF-8.  Unfortunately, no one is really looking at the patches because apparently no one on this planet would bother serving WordPress as true XHTML.  Anyway, enough whinging &#8211; it would be great if some of these could make it into WordPress 2.5.1.</p>
<p>In the meantime, if anyone wants to try and break my WordPress install by injecting funky XHTML, please be my guest on <a href="http://blog.codedread.com/xhtml-pinata" title="Please try to break my site with invalid XHTML">this page</a>.  Currently <a href="http://intertwingly.net/blog" title="Sam Ruby">Sam</a> is in the lead with two breakages (now fixed).  Oh, and your name doesn&#8217;t have to be Philip, Jacques, Mark or Shelley either.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/04/23/wordpress-xhtmlation-stalled/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>35,000-Year-Old Tools Found</title>
		<link>http://www.codedread.com/blog/archives/2008/04/07/35000-year-old-tools-found/</link>
		<comments>http://www.codedread.com/blog/archives/2008/04/07/35000-year-old-tools-found/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 22:57:44 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/04/07/35000-year-old-tools-found/</guid>
		<description><![CDATA[Via CNN. My only question: Did they support XHTML output?]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/tools.svgz"><span/></object><a href="http://www.cnn.com/2008/WORLD/asiapcf/04/07/australia.stone.tool.ap/index.html?eref=rss_tech">Via CNN</a>.  My only question:  Did they support XHTML output?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/04/07/35000-year-old-tools-found/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Feeding The Conversation</title>
		<link>http://www.codedread.com/blog/archives/2008/02/27/feeding-the-conversation/</link>
		<comments>http://www.codedread.com/blog/archives/2008/02/27/feeding-the-conversation/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 01:47:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/02/27/feeding-the-conversation/</guid>
		<description><![CDATA[Since my feeds are now customized as part of my theme, I thought I&#8217;d take a look at some of the interesting things you can do. I knew that WordPress supports a variety of feeds at different levels (main feed, main comments feed, per-entry feed, per-category feed, etc). What I was wondering was if there [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/feed.svgz"><span/></object>Since my feeds are now customized as part of my theme, I thought I&#8217;d take a look at some of the interesting things you can do.  I knew that <a href="http://www.wordpress.org/">WordPress</a> supports a variety of feeds at different levels (main feed, main comments feed, per-entry feed, per-category feed, etc).</p>
<p>What I was wondering was if there was a way to link each post in the feed to the comments feed of that story.  This would allow a good feed reader to let people easily subscribe from the main feed to the conversation feed of a particular story where they have left a comment.  Turns out it was fairly straightforward.<span id="more-434"></span></p>
<p>Doing a quick dig around the web turned up <a href="http://www.ietf.org/rfc/rfc4685.txt" title="Atom Threading Extensions">RFC 4685</a>, which is an extension to the <a href="http://tools.ietf.org/html/rfc4287">Atom format</a> to support &#8220;threading&#8221;.  It&#8217;s been around since 2006.  Apparently there was a similar effort on the RSS side called commentsRss.</p>
<p>Anyway, the spec addresses much more than I need at the moment.  All I want to do is, for each &#60;entry&#62; element, to include a link to the comments feed for that post.  I do this by adding the following element inside each &#60;entry&#62; element in the feed:</p>
<div class="code">&#60;entry&#62;<br/>&#160;&#160;&#60;link rel=&#8221;replies&#8221; href=&#8221;&#60;url-of-story-here&#62;?feed=atom&#8221;&#62;<br/>&#160;&#160;&#8230;<br/>&#60;/entry&#62;</div>
<p>To do this, I updated my feed-atom.php file to:</p>
<div class="code">&#60;link rel=&#8221;replies&#8221; href=&#8221;&#60;?php echo the_guid() . &#8216;?feed=atom&#8217; ?&#62;&#8221; /&#62;</div>
<p>Ta da.  Then I thought I&#8217;d track this down in WordPress and see if there was a bug/patch.  Guess what&#8230; <a href="http://www.intertwingly.net/" title="Sam Ruby">Sam</a> has already submitted <a href="http://trac.wordpress.org/ticket/5434">a patch</a> for this.  Two months ago.  It will be in WordPress 2.5.  Weird&#8230; Cool&#8230;</p>
<p>But the real question is why haven&#8217;t feed readers (like <a href="http://reader.google.com/">Google Reader</a>) made more use of this?  I think this is the biggest problem with having conversations in the blogosphere.  You may subscribe to a feed that you enjoy.  You may read a good story that someone publishes.  You want to contribute to the discussion so you post a comment.  Now if you want to keep following that story you either have to search for that story&#8217;s comment feed or (more often than not) you have to continue visiting the web page to see if anyone posts a new comment.  Wouldn&#8217;t it be great if your feed reader provided you with a button next to that story you can click to automatically subscribe to that conversation (i.e. the comments feed for that story).  After a while the conversation may dry up, upon which you can unsubscribe by unchecking a box in the UI or something.</p>
<p>Hey, this may already be out there and I might get laughed off the face of the blogosphere for still re-visiting web pages throughout the day.  Feel free to leave your laughter below&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/02/27/feeding-the-conversation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inline vs. Referenced SVG: Best of Both Worlds?</title>
		<link>http://www.codedread.com/blog/archives/2008/02/27/inline-vs-referenced-svg-best-of-both-worlds/</link>
		<comments>http://www.codedread.com/blog/archives/2008/02/27/inline-vs-referenced-svg-best-of-both-worlds/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 15:51:41 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[atom]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/02/27/inline-vs-referenced-svg-best-of-both-worlds/</guid>
		<description><![CDATA[Sam had a good thought over at Erik&#8217;s blog. In the past, I&#8217;ve mostly been on the side of referenced SVG for clip art &#8211; but he raises a good point. I&#8217;ve just started to use clip art on my blog. I use it for a variety of reasons: To add some colour/interest, to quickly [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/svg.svgz"><span/></object><a href="http://intertwingly.net/">Sam</a> had a <a href="http://my.opera.com/MacDev_ed/blog/collection-of-news#comment4772069">good thought</a> over at <a href="http://my.opera.com/MacDev_ed/blog/">Erik&#8217;s blog</a>.  <a href="http://blog.codedread.com/archives/2007/04/25/inline-vs-referenced-svg/">In the past</a>, I&#8217;ve mostly been on the side of referenced <a href="http://www.w3.org/Graphics/SVG/" title="Scalable Vector Graphics">SVG</a> for clip art &#8211; but he raises a good point.  <span id="more-433"></span></p>
<p>I&#8217;ve just started to use clip art on my blog.  I use it for a variety of reasons:  To add some colour/interest, to quickly give an indication of the topic, to provide a link to a page related to the topic.  I plan to reuse the clipart over-and-over again.  In my opinion, the best way to do this is by using the &#60;object&#62; tag that references a compressed SVG file.  This means the SVG content is as small as it can possibly be.  It allows the browser to cache the file.  If I want to update the image with a link, then I only have to update it in one place and all my entries get the updates.  It also gives me a mechanism to provide fallback content for browsers that don&#8217;t support SVG content (like Internet Explorer).  Note that at the moment, I do not do provide fallback content because I can&#8217;t be bothered to rasterize the SVGs for just one browser &#8211; but I could do this if I wanted to.</p>
<p>You may argue that the gzip-compressed SVG is less accessible, but I also provide the de-compressed version in the same location (just remove the &#8216;z&#8217; from the file extension).  I also have a growing list of my clip art <a href="http://codedread.com/clipart/">here</a>.</p>
<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/feed.svgz"><span/></object>However, Sam has brought up <a href="http://www.intertwingly.net/blog/2007/04/26/Inline-vs-Referenced-SVG">in the past</a> that allowing &#60;object&#62;s into syndicated feed formats like Atom is less secure than inline SVG itself.  The other arguments in favor of inline SVG are:  the image and article text are self-contained, the source can be more easily viewed, and you can&#8217;t <a href="http://en.wikipedia.org/wiki/Inline_linking">hot-link</a> to the SVG image.</p>
<p>His suggestion to Erik was to provide referenced SVG &#60;object&#62;s in the browser, but when producing feeds to take the SVG and put it inline with the XHTML content.  This is a great idea.  Since my feed-producing code is now within my WordPress theme (thanks to a tip from <a href="http://realtech.burningbird.net/">Shelley</a>), I might try to do this&#8230;</p>
<p>P.S.  Something that just occurred to me:  Wouldn&#8217;t it also be possible for Sam to do this object->inline conversion on the planet side?  Requiring everyone producing feeds to do this seems like more work than to do it in one central location.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/02/27/inline-vs-referenced-svg-best-of-both-worlds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stimulating WordPress</title>
		<link>http://www.codedread.com/blog/archives/2008/02/25/stimulating-wordpress/</link>
		<comments>http://www.codedread.com/blog/archives/2008/02/25/stimulating-wordpress/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 18:05:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/02/25/stimulating-wordpress/</guid>
		<description><![CDATA[I think XHTMLate should be pronounced &#8220;stimulate&#8221;. Anyway, here&#8217;s a list of WordPress bugs that I think are important for XHTML: 3833 &#8211; Extra &#60;/p&#62; inside blockquote 3914, 4746 &#8211; Two feeds on Dashboard don&#8217;t work with application/xhtml+xml 4466 &#8211; Serve application/xhtml+xml if browser compliant 4857 &#8211; More issues with wpautop() 5144 &#8211; Paragraph end-tag [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/wordpress.svgz"><span/></object>I think <a href="http://realtech.burningbird.net/development/xhtmlating-feeds/">XHTMLate</a> should be pronounced &#8220;stimulate&#8221;.  Anyway, here&#8217;s a list of WordPress bugs that I think are important for XHTML:  <span id="more-432"></span></p>
<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://www.codedread.com/clipart/bugs.svgz"><span/></object></p>
<ul>
<li><a href="http://trac.wordpress.org/ticket/3833">3833</a> &#8211; Extra &#60;/p&#62; inside blockquote</li>
<li><a href="http://trac.wordpress.org/ticket/3914">3914</a>, <a href="http://trac.wordpress.org/ticket/4746">4746</a> &#8211; Two feeds on Dashboard don&#8217;t work with application/xhtml+xml</li>
<li><a href="http://trac.wordpress.org/ticket/4466">4466</a> &#8211; Serve application/xhtml+xml if browser compliant</li>
<li><a href="http://trac.wordpress.org/ticket/4857">4857</a> &#8211; More issues with wpautop()</li>
<li><a href="http://trac.wordpress.org/ticket/5144">5144</a> &#8211; Paragraph end-tag wrongly inserted after object tag</li>
<li><a href="http://trac.wordpress.org/ticket/5250">5250</a> &#8211; wpautop() issue with nested lists</li>
<li><a href="http://trac.wordpress.org/ticket/5998">5998</a> &#8211; Invalid Unicode characters</li>
</ul>
<p>I know there are a heap more.  I know more will be submitted.  This is just what I found when scanning the first few pages of a search for &#8220;xhtml&#8221;.</p>
<p>I&#8217;ve encountered 5144 directly on this blog with my <a href="http://codedread.com/clipart/">clip art</a>.  I&#8217;ve found that I have to start the paragraph right after the &#60;object&#62; tag without a newline.  A little annoying, but workaround-able.</p>
<p><a href="http://realtech.burningbird.net/">Shelley</a> just created Bug 5998 right now.  This is a bug for WP accepting <a href="http://www.w3.org/TR/REC-xml/#NT-Char">illegal Unicode code points</a> like U+FFFE, which <a href="http://golem.ph.utexas.edu/~distler/blog/">Jacques</a> so <a href="http://blog.codedread.com/archives/2008/02/23/perception-is-everything/#comment-12344">kindly demonstrated</a>.</p>
<p>Sad/Funny sidenote: When he did this, I ran into the very problem that <a href="http://diveintomark.org/archives/2004/01/14/thought_experiment">Mark mentioned</a> years ago and I had to poke my WordPress database option to switch back to text/html for the WordPress admin panel so I could correct Jacques&#8217; invalid character.  <a href="http://intertwingly.net/blog/2008/02/24/XHTMLating-WordPress#c1203957015">Tail now less bushy</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/02/25/stimulating-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New XHTML+SVG Theme</title>
		<link>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/</link>
		<comments>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 05:01:58 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/</guid>
		<description><![CDATA[I&#8217;ve been tinkering at a new theme for my website since the Christmas holidays and finally got around to flipping the switch this weekend. I decided to try my hand, for the first time, at real XHTML served as application/xhtml+xml but with PHP content negotiation to text/html for poor ol&#8217; Internet Explorer. I like the [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/party.svgz"><span/></object>I&#8217;ve been tinkering at a new theme for <a href="http://www.codedread.com/">my website</a> since the Christmas holidays and finally got around to flipping the switch this weekend.  I decided to try my hand, for the first time, at real XHTML served as application/xhtml+xml but with PHP content negotiation to text/html for poor ol&#8217; Internet Explorer.  <span id="more-425"></span></p>
<p>I like the idea of having a seamless transition between my blog and website. so this evening I decided to flip the switch on the blog, even though the WordPress theme is very much a work-in-progress.  I still need to figure out what to do with the sidebar,  but I can always hack away on the theme on my old blog installation internally and publish updates once they have been verified on a set of decent browsers (Firefox 2+, Opera 9+, Safari 3+).</p>
<p>I use <a href="http://www.w3.org/Graphics/SVG" title="Scalable Vector Graphics">SVG</a> in a bunch of different places:  inline as decoration around the page (the blue gradient and the title) and referenced (via &#60;object&#62;) for the icon menu (at the top) and W3C validation badges (at the bottom).  Once I nail down all the particulars, I&#8217;ll compress <a href="http://www.codedread.com/menu.svg" title="SVG-enabled icon menu">menu.svg</a> and serve only menu.svgz so it can be neatly cached (at roughly 15kb).  But I&#8217;ll keep menu.svg around for web developers to look at if they&#8217;re curious.</p>
<p>Work on this led to a few bugs reported at Mozilla, WebKit and Opera &#8211; but no show stoppers.  The best user experience is in Opera 9.5.  For the first time, I&#8217;m using declarative animation (in a simple way) for icon mouse-hovering.  Firefox and Safari users miss out for now, unfortunately.</p>
<p>It turns out, as <a href="http://realtech.burningbird.net/standards/adventures-in-xhtml/">Shelley has mentioned</a>, that the best developer experience to work on XHTML is also (by far) Opera.  Instead of Firefox&#8217;s &#8220;yellow screen of death&#8221; we&#8217;re greeted with Opera&#8217;s &#8220;light grey screen of mild achiness&#8221;.  Instead of cryptic messages about unexpected tags, the element which failed to be terminated and the tag that broke the XML parsing are highlighted for you.</p>
<p>I encountered some funniness when I tried to validate my pages on the <a href="http://validator.w3.org/">W3C Validator</a>.  Apparently it thought they were text/html pages.  So I had to add a little catch in my PHP content negotiation code to force application/xhtml+xml when I want to.  Anyway, the PHP content negotiation code looks like this:</p>
<div class="code">&#60;?php<br/>if( (!stristr($_SERVER["HTTP_ACCEPT"],&#8221;application/xhtml+xml&#8221;) &#38;&#38; <br/>&#160;&#160;&#160;&#160; !isset($_GET['xhtml'])) &#124;&#124; $_GET['xhtml'] === &#8217;0&#8242; )<br/>{<br/>&#160;&#160;header(&#8220;Content-Type: text/html;charset=utf-8&#8243;);<br/>&#160;&#160;header(&#8220;Vary: Accept&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;!DOCTYPE HTML PUBLIC \&#8221;-//W3C//DTD HTML 4.01//EN\&#8221;".<br/>&#160;&#160;&#160;&#160;&#8221; \&#8221;http://www.w3.org/TR/html4/strict.dtd\&#8221;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;html lang=\&#8221;en\&#8221;&#62;\n&#8221;);<br/>}<br/>else <br/>{<br/>&#160;&#160;header(&#8220;Content-Type: application/xhtml+xml;charset=utf-8&#8243;);<br/>&#160;&#160;header(&#8220;Vary: Accept&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;&#8221; . &#8220;?xml version=\&#8221;1.0\&#8221; encoding=\&#8221;UTF-8\&#8221; ?&#8221; . &#8220;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;!DOCTYPE html PUBLIC \&#8221;-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN\&#8221;" .<br/>&#160;&#160;&#160;&#160;&#8221;\&#8221;http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\&#8221;&#62;\n&#8221;);<br/>&#160;&#160;printf(&#8220;&#60;html xmlns=\&#8221;http://www.w3.org/1999/xhtml\&#8221; xmlns:svg=\&#8221;http://www.w3.org/2000/svg\&#8221;" .<br/>&#160;&#160;&#160;&#160;&#8221; xmlns:xlink=\&#8221;http://www.w3.org/1999/xlink\&#8221; xml:lang=\&#8221;en\&#8221;&#62;\n&#8221;);<br/>}<br/>?&#62;<br/></div>
<p>You might find some of my old site themes amusing, sad, or boring:</p>
<ul>
<li><a href="http://www.codedread.com/archive/2004-04/">2004-04</a> &#8211; Early static HTML, table-based layout, no CSS.</li>
<li><a href="http://www.codedread.com/archive/2005-04/">2005-04</a> &#8211; Reworked into a templated PHP site.  Eventually I turned it from table-based to CSS layout-based (snapshot is table-based).</li>
<li><a href="http://www.codedread.com/archive/2006-01/">2006-01</a> &#8211; Theme from 2006.  Using CSS for layout.  Embedded SVG aqua buttons for navigation menus.  All modern browsers now support the features I was using on this page.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/02/18/new-xhtmlsvg-theme/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>FXPointer &#8211; Link Exactly</title>
		<link>http://www.codedread.com/blog/archives/2007/10/30/fxpointer-link-exactly/</link>
		<comments>http://www.codedread.com/blog/archives/2007/10/30/fxpointer-link-exactly/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 03:54:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[fxpointer]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/10/30/fxpointer-link-exactly/</guid>
		<description><![CDATA[How many times have you told a friend or colleague &#8220;Go to http://example.com/some/doc and search for XXXX&#8221; ? I do it a lot actually. Ideally web pages should identify significant sections of a web page with identifiers (id=&#8221;foo&#8221;) so that you can link to http://example.com/some/doc/#foo, but the problem is that not everyone follows this practice. [...]]]></description>
			<content:encoded><![CDATA[<p>How many times have you told a friend or colleague &#8220;Go to http://example.com/some/doc and search for XXXX&#8221; ?  I do it a lot actually.  Ideally web pages should identify significant sections of a web page with identifiers (id=&#8221;foo&#8221;) so that you can link to http://example.com/some/doc/#foo, but the problem is that not everyone follows this practice.  In fact, there are a lot of big specification documents where you&#8217;d like to point someone to a specific paragraph to save someone time and encourage them to actually visit the link and read it.  This becomes increasingly important as the mobile web accelerates and small screens with harder-to-use keyboards become more prevalent.  I hope this Firefox extension will help.<span id="more-402"></span></p>
<p>Tonight I updated my Firefox extension, <a href="http://www.codedread.com/fxpointer">FXPointer</a>, so that you can right-click on some web page text and get the XPointer element link that will drive people directly to it.  This is the first time the extension comes close to being semi-usable, so I thought I should start to get the word out.  It&#8217;s very similar to <a href="http://www.schepers.cc/">Doug&#8217;s</a> excellent <a href="http://www.schepers.cc/?p=39">Idiri</a> extension, except that FXPointer tries to use the XPointer specification for HTML documents.  Thus, it will allow you to link directly to any element in a web page.</p>
<p>Truth be told, Firefox already supports XPointer to some degree on true XML documents.  Tragically, it doesn&#8217;t work with XHTML documents (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=235409">Bug 235409</a>).  Worse yet, the amount of HTML on the web vastly outweighs the amount of XHTML, meaning that XPointer will never really reach critical mass without a boost in the HTML direction.</p>
<p>For Opera users, please see <a href="http://student.kuleuven.be/~s0159198/xpointer/">Jeroen&#8217;s web page</a> that gives you some User JavaScript to get things going.  This means that you can get some XPointer/HTML functionality on two of the four big browsers out there.</p>
<p>Anyway, I plan to start using these more-specific links going forward.  If you don&#8217;t have XPointer support, you&#8217;ll just get a less-specific link.  I&#8217;ll try to make improvements that degrade even more gracefully in the future.</p>
<p>Some future plans that may or may not transpire:</p>
<ul>
<li>Support for the <a href="http://www.w3.org/TR/xptr-xpointer/">xpointer scheme</a> so you can use XPath and search strings (probably less brittle)</li>
<li>Support for SVG&#8217;s XPointer-friendly scheme <a href="http://www.w3.org/TR/SVG11/linking.html#SVGFragmentIdentifiers">svgView</a></li>
<li>Some configuration of the context menu</li>
</ul>
<p>If you want to submit patches, download the .xpi, unzip it and hack away.</p>
<p>FXPointer does its best to use IDs where it can, so this is less brittle than it seems, but I still wouldn&#8217;t recommend this for any dynamic web pages with wildly changing <span class="acronym" title="Document Object Models">DOMs</span>.  Of course the ultimate would be to support the <a href="http://www.w3.org/TR/xptr-xpointer/">xpointer</a> scheme in some way such that people can use XPath and string searches.</p>
<p>If you think this extension is useful, please help lobby for native XPointer/HTML support in browsers.</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/10/30/fxpointer-link-exactly/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox Extensions and Detecting A Clicked Link</title>
		<link>http://www.codedread.com/blog/archives/2007/10/29/firefox-extensions-and-detecting-a-clicked-link/</link>
		<comments>http://www.codedread.com/blog/archives/2007/10/29/firefox-extensions-and-detecting-a-clicked-link/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 02:37:26 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/10/29/firefox-extensions-and-detecting-a-clicked-link/</guid>
		<description><![CDATA[I&#8217;m working on my first Firefox extension &#8211; an attempt to get Firefox to support some version of XPointer that will work on HTML documents. If you haven&#8217;t read about XPointer before, you can start at my recent blog post here. At the moment, things are pretty much in a raw, not-at-all-ready-for-prime-time state, though I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on my <a href="http://www.codedread.com/fxpointer">first Firefox extension</a> &#8211; an attempt to get Firefox to support some version of <a href="http://www.w3.org/TR/xptr-framework/">XPointer</a> that will work on HTML documents.  <span id="more-401"></span></p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p>If you haven&#8217;t read about <a href="http://www.w3.org/TR/xptr-framework/">XPointer</a> before, you can start at my recent blog post <a href="http://blog.codedread.com/archives/2007/10/10/more-on-xpointer/">here</a>.</p>
<p>At the moment, things are pretty much in a raw, not-at-all-ready-for-prime-time state, though I&#8217;ve traveled down some lanes that I&#8217;ve always wanted to try out (specifically I&#8217;ve got my first real taste of <a href="http://www.mozilla.org/projects/xul/">XUL</a> and <a href="http://developer.mozilla.org/en/docs/XBL:XBL_1.0_Reference">XBL</a>).  Unfortunately it took me a while to get even a little clue on some of this stuff and it can be a bit discouraging.  Here&#8217;s hoping the Mozilla documentation improves both in coverage and recency &#8211; but I&#8217;m not holding my breath.</p>
<p>The goal is:  I want to modify the view of an HTML document if any XPointer parts show up in the URL bar.</p>
<p>I started with simply adding a &#8220;load&#8221; event handler to the gBrowser.  This worked fine any time a page had to load (including in a new tab or in the existing tab).  However, what I noticed was that a &#8220;load&#8221; event would not fire if the link was in the same page (i.e. just the &#8220;hash&#8221; part of the URL had changed) if you clicked a link or when you typed it in.  So if I&#8217;m at page foo.html and that page has a link to foo.html#element(bar), when I click that link I do not get a &#8220;load&#8221; event.</p>
<p>So that led me into learning a bit more about XBL to try and add some bindings to the chrome.</p>
<p>Where I sit now:  I&#8217;ve got XBL defining an evalXPointer() method on the &#8220;urlbar&#8221; XUL widget.  When a new document is loaded, I invoke this method.  Also, when a new URL is entered into the location bar (and the user presses Enter), I invoke this method.  Finally, if the &#8220;Go&#8221; button is clicked I also invoke this method.  All my &#8220;logic&#8221; sits in JavaScript in the XBL at the moment.</p>
<p>Anyway, I kind of get the idea that what I&#8217;m doing is not appropriate.  That&#8217;s what community feedback is all about.  The above bindings seem kind of like a hack.  What I really want to do is get notified when any link has been activated (by click or otherwise) and regardless of whether this link causes a &#8220;load&#8221; event or if it&#8217;s in the same page.  Does anybody know the sane way to do this?</p>
<p>Better yet, is there a way to detect when a browser tab&#8217;s address has changed in a definitive way?  I don&#8217;t want to look at every keypress.</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/10/29/firefox-extensions-and-detecting-a-clicked-link/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More On XPointer</title>
		<link>http://www.codedread.com/blog/archives/2007/10/10/more-on-xpointer/</link>
		<comments>http://www.codedread.com/blog/archives/2007/10/10/more-on-xpointer/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 18:59:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/10/10/more-on-xpointer/</guid>
		<description><![CDATA[As an update to yesterday&#8217;s post I thought I&#8217;d elucidate what I&#8217;ve learned about XPointer. First, some high-level overview: XPointer is &#8220;an extensible system for XML addressing&#8221;, meaning that with it, you can address arbitrary portions of XML documents. XPointer is specified by the XPointer Framework and then realized through various &#8220;schemes&#8221;. The element XPointer [...]]]></description>
			<content:encoded><![CDATA[<p>As an update to <a href="http://blog.codedread.com/archives/2007/10/09/397/">yesterday&#8217;s post</a> I thought I&#8217;d elucidate what I&#8217;ve learned about XPointer.  <span id="more-398"></span></p>
<p>First, some high-level overview: XPointer is &#8220;an extensible system for XML addressing&#8221;, meaning that with it, you can address arbitrary portions of XML documents.  XPointer is specified by the <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</a> and then realized through various &#8220;schemes&#8221;.</p>
<h3>The element XPointer scheme</h3>
<p>The <a href="http://www.w3.org/TR/xptr-element/">element</a> scheme allows to do relatively simple addressing within an XML document.  You can address an element that has id=&#8221;foobar&#8221; like:  <code>element(foobar)</code>.  You can also use a step-wise navigation within the element scheme to get at an arbitrary element.  For example, <code>element(/1/3/5)</code> would address the fifth child of the third child of the first element (i.e. the root).  Another example would be <code>element(baz/2)</code> which addresses the second child of the element with id=&#8221;baz&#8221;.</p>
<p>Now, how can you <em>use</em> an XPointer address?  Well, the way in which I&#8217;m interested in doing this is by using it as a URL fragment.  For instance, in yesterday&#8217;s post I talked about linking to the &#8220;NodeList&#8221; section of <a href="http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html">this page</a>.   Well to do that with XPointer framework using the Element scheme, my URL would be:</p>
<p><a title="Link to the NodeList section in the DOM Level 2 Core Spec" href="http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html#element(/1/2/3/5/1/15)">http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html#element(/1/2/3/5/1/15)</a></p>
<p>There are some problems with the above, not least of which is that the above document is <strong>NOT</strong> well-formed XML (see the &#60;link&#62; tags for starters).  No, unfortunately the document is HTML tag soup.  Could an XPointer implementation support an HTML document?</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p>This brings me to another topic:  Implementation Support of XPointer.  <a href="http://blog.codedread.com/archives/2007/10/09/397/#comment-12149">Anne</a> let me know that Mozilla has some form of XPointer support.  I guess <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=182323">this bug</a> was used to introduce it.  It could enable some really <a title="Annotate web pages" href="https://bugzilla.mozilla.org/show_bug.cgi?id=12305">cool</a> <a title="Bookmark to a specific element on a page" href="https://bugzilla.mozilla.org/show_bug.cgi?id=159716">features</a>.  But there are some <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=235409">problems</a> with it.  And also, someone wants to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=388704">drop support</a> because no one uses it yet (you have to love the referenced YouTube video in that bug, though).</p>
<p>So I took the HTML page and reformatted it to be proper XML (defined the &#38;nbsp; entity, closed all &#60;link&#62;, &#60;hr&#62;, &#60;br&#62; elements and wrapped the script in &#60;![CDATA[ ]]&#62; tags).  Once I did this, the following URL worked in Firefox 2.0:</p>
<p>file://d/ecma-script-binding.xml#element(/1/2/3/5/1/15)</p>
<p>The fact that this works on XML documents but not on XHTML documents (and especially HTML documents) is a crying shame.  I would love to use this feature to direct people to static, non-changing web pages like specifications&#8230;</p>
<h3>The xpointer XPointer scheme</h3>
<p>The element scheme is arguably the least complicated XPointer scheme.  The other scheme of interest is the confusingly named <a href="http://www.w3.org/TR/xptr-xpointer/">xpointer</a> XPointer scheme.  This scheme uses the XPath language to allow richer addressing into documents.  For instance, to address the first instance of text &#8220;foobar&#8221;, I could use:  <code>xpointer(string-range(/, foobar))</code>.  Now wouldn&#8217;t that be cool?  Then I could change my URL to:</p>
<p><a title="Link to the first instance of the words 'square bracket' in the DOM Level 2 Core Spec" href="http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html#xpointer(string-range(/,square%20bracket))">http://&#8230;/ecma-script-binding.html#xpointer(string-range(/,square%20bracket))</a></p>
<p>so that the reader is instantly drawn to the words &#8220;square bracket&#8221; in that document.</p>
<p>Now I realize that XPointer is inherently brittle and can break on even the simplest document change (hell, regular web links are similarly brittle when you come down to it).  I also realize that the preferred mechanism is for authors to use the id attribute wherever possible, since all browsers support the simple #some-id anchor.  Furthermore, I realize there are problems with trying to use XPointer (a XML technology) on HTML documents.  However, despite all that, I still think this would be a cool feature to be able to use on those web pages that are static and not likely to change over time (&#8220;frozen&#8221; specs, blog entries).  This benefit would be particularly noticed by those people browsing the web on smaller devices with potentially painful-to-access &#8220;text search&#8221; facilities (hint: iPhone and the like).  Of course with any technology, both implementors and authors have to get behind it to make its benefits known.</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/10/10/more-on-xpointer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Use IE Conditional Comments in &#8220;XHTML&#8221;</title>
		<link>http://www.codedread.com/blog/archives/2007/04/17/how-to-use-ie-conditional-comments-in-xhtml/</link>
		<comments>http://www.codedread.com/blog/archives/2007/04/17/how-to-use-ie-conditional-comments-in-xhtml/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 20:11:02 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/04/17/how-to-use-ie-conditional-comments-in-xhtml/</guid>
		<description><![CDATA[There&#8217;s a lot going on in the HTML Working Group mailing list right now about opt-in mechanisms for HTML5, discussions with smart people like Chris Wilson (co-chair and Microsoft IE champion) and Ian Hickson (WHATWG champion). I&#8217;ve going to sidestep the polemics for now &#8211; I&#8217;ve been trying to distill my own thoughts on that [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a lot going on in the HTML Working Group mailing list right now about opt-in mechanisms for HTML5, discussions with smart people like Chris Wilson (co-chair and Microsoft IE champion) and Ian Hickson (WHATWG champion).  I&#8217;ve going to sidestep the polemics for now &#8211; I&#8217;ve been trying to distill my own thoughts on that big debate, but things are still swirling around in my head because I&#8217;m still learning about the history of HTML, quirks mode, standards mode, DOCTYPEs, etc.  Instead, I&#8217;m just going to write a (hopefully) quick entry on something I just figured out today.  <span id="more-357"></span></p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p>If you are a web developer, I am sure you are very familiar with how difficult it can be to get the Internet Explorer browser to display your web pages correctly and still use web standards that are implemented more properly by other browsers.  Many hundreds of people wish that this were not so, but it&#8217;s an ugly fact in web development today.  IE includes a clever little feature called &#8220;<a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp">Conditional Comments</a>&#8221; that can allow you to select what elements on your page are displayed for certain versions of IE.  I wish that Conditional Comments were not necessary (because they muckify my markup), but that is the state things are in right now.</p>
<p>The traditional way of explaining this is by some examples:</p>
<div class="code">
<pre>
&#60;!--[if IE]>
  &#60;p>Only IE will display this paragraph&#60;/p>
&#60;![endif]-->
</pre>
</div>
<p><span style="font-weight:bold; color:green">Figure 1 &#8211; Conditional Comments for IE</span></p>
<p>If you know your HTML (especially how HTML comments work), then it should be pretty obvious that the whole code above looks like one big comment, meaning that it will not be displayed.  However, IE treats the square brackets differently by displaying the code between <i>[if IE]</i> and <i>[endif]</i> as code that it should display.</p>
<p>So that&#8217;s how to include code only for IE and exclude code from other browsers.  Now how to do the reverse:</p>
<div class="code">
<pre>
&#60;![if !IE]>
  &#60;p>All browsers except IE will display this paragraph&#60;/p>
&#60;![endif]-->
</pre>
</div>
<p><span style="font-weight:bold; color:#700">Figure 2 &#8211; Conditional Comments for Other Browsers (The Wrong Way)</span></p>
<p>In HTML browsers, the above code displays in every browser except IE (which will ignore everything between <i>[if !IE]</i> and <i>[endif]</i>).  It seems to rely on some de-facto implementations where anything between <i>&#60;!</i> and <i>&#62;</i> is ignored by browsers as if it was a comment.  The problem is that the above is not valid XHTML (comments in XHTML are anything between <i>&#60;!&#8211;</i> and <i>&#8211;&#62;</i>).</p>
<p>This is how I was feeding <a href="http://www.w3.org/Graphics/SVG/" title="Scalable Vector Graphics">SVG</a> to IE (in an <i>&#60;embed></i> element) and other browsers (in an <i>&#60;object></i> element).  However, it always rankled me that my pages wouldn&#8217;t validate as XHTML as a result of the conditional comments.</p>
<p>Then, I was reading <a href="http://www.xml.com/pub/a/2003/07/02/dive.html">this aging article</a> by <a href="http://www.diveintomark.org/">Mark Pilgrim</a> and found an example of valid &#8220;downlevel-revealed&#8221; comments (as Microsoft calls them):</p>
<div class="code">
<pre>
&#60;!--[if !IE]>-->
  &#60;p>All browsers except IE will display this paragraph&#60;/p>
&#60;!--&#60;![endif]-->
</pre>
</div>
<p><span style="font-weight:bold; color:green">Figure 3 &#8211; Conditional Comments for Other Browsers (The Right Way)</span></p>
<p>NOTE: It took me some time to figure this out because I was putting spaces between <i>[if !IE]></i> and <i>&#8211;></i> and between <i>[endif]</i> and <i>&#8211;></i>.  Make sure there are no spaces and things should work.  Here&#8217;s a <a href="http://www.codedread.com/test-cc.html">test page</a> so you can see how things work.  There should be 4 paragraphs displayed in every browser.</p>
<p>In fairness, after I started writing up this entry, I found that <a href="http://www.webmasterworld.com/css/3232700.htm" title="See Post 3239462 by Setek">several</a> <a href="http://www.cssplay.co.uk/menu/conditional.html">other</a> <a href="http://www.456bereastreet.com/archive/200511/valid_downlevelrevealed_conditional_comments/">people</a> had already discovered this.</p>
<p>Anyway, I know the other debate out there.  The one about how XHTML is not worth the trouble and can be harmful if served as text/html, but I&#8217;ve already written too much today to get into that <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/04/17/how-to-use-ie-conditional-comments-in-xhtml/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

