<?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; html</title>
	<atom:link href="http://www.codedread.com/blog/archives/tag/html/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>Sanitary WordPress Comments</title>
		<link>http://www.codedread.com/blog/archives/2008/09/25/sanitary-wordpress-comments/</link>
		<comments>http://www.codedread.com/blog/archives/2008/09/25/sanitary-wordpress-comments/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 17:45:38 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[whitelist]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/09/25/sanitary-wordpress-comments/</guid>
		<description><![CDATA[Can a WordPress plugin be written that would sanitize the HTML in my blog comments through this thing? kthxbye]]></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>Can a <a href="http://wordpress.org/">WordPress</a> plugin be written that would sanitize the HTML in my blog comments through <a href="http://html-whitelist.appspot.com/" title="HTML Whitelist service built using Google App Engine">this thing</a>?  kthxbye</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/09/25/sanitary-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Parameterizing SVG and HTML</title>
		<link>http://www.codedread.com/blog/archives/2008/07/25/parameterizing-svg-and-html/</link>
		<comments>http://www.codedread.com/blog/archives/2008/07/25/parameterizing-svg-and-html/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 17:11:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[whatwg]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/07/25/parameterizing-svg-and-html/</guid>
		<description><![CDATA[Hallvord R.M. Steen (an Opera employee and member of the HTML WG) was kind enough to create a bug regarding an issue I had raised a few months back. It is currently not possible inside an embedded SVG to determine the parameters sent in from HTML:object if the two documents are on different domains. This [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/html.svgz"><span/></object><a href="http://my.opera.com/hallvors/blog/">Hallvord R.M. Steen</a> (an <a href="http://www.opera.com/">Opera</a> employee and member of the <a href="http://www.w3.org/html/wg/">HTML WG</a>) was kind enough to create a <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5846" title="Allow embedded SVG to get the parameters sent in from HTML:object">bug</a> regarding an issue I had raised a few months back.  It is currently not possible inside an embedded SVG to determine the <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3.2">parameters</a> sent in from <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3">HTML:object</a> if the two documents are on different domains.  This appears to be a hole in the HTML4 spec, which doesn&#8217;t really address cross-domain security concerns for the HTML:object element.<span id="more-478"></span></p>
<p>At the moment, the issue is dead in the water.  <a href="http://ln.hixie.ch/">Ian Hickson</a> suggested that <a href="http://tools.ietf.org/html/rfc3986#section-3.4" title="Query Part of the Uniform Resource Identifier">query parameters</a> could solve this issue.  However, query parameters are part of the <abbr title="Uniform Resource Identifier">URI</abbr>.  In my experiments with PHP, I found that query parameters are a good way to ensure the browser actually re-fetches a document and doesn&#8217;t rely on the document in the cache.   This means that using query parameters would defeat one of the purposes of parameterizing the SVG in the first place (one document in the browser cache that could be used for many purposes).</p>
<p>It&#8217;s sad because plugins like Flash have the luxury of being able to <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417">pass parameters</a> into their content, but we can&#8217;t do that for content the browser understands natively (like SVG and HTML).  I failed to convince the <a href="http://realtech.burningbird.net/semweb/accessibility-and-microformats/#comment-471">benevolent dictator</a> that this is an important capability that the open web stack lacks.</p>
<p>I think this would be a nice way to turn bits of HTML/SVG into simple components without requiring script on the embedding side and without requiring heavier technologies like XBL and/or waiting for browser support of postMessage().  For example, it seems like web page authors using things like Adsense could benefit from this by not having to include foreign script in their pages, but apparently Google has no interest in this.</p>
<p>Eric Meyer&#8217;s <a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-395213">link-anywhere proposal</a> inspired me to at least float this issue in my blog in case someone else thinks it important.  For now, <a href="http://www.w3.org/Bugs/Public/show_activity.cgi?id=5846">I&#8217;m tired</a>.  Hm, I wonder if I can use the <a href="http://ajaxian.com/archives/windowname-meet-dojoxiowindowname">window.name hack</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/07/25/parameterizing-svg-and-html/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SVG News Digest:  2008-04-16</title>
		<link>http://www.codedread.com/blog/archives/2008/04/16/svg-news-digest-2008-04-16/</link>
		<comments>http://www.codedread.com/blog/archives/2008/04/16/svg-news-digest-2008-04-16/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 04:15:30 +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[html]]></category>
		<category><![CDATA[smil]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[whatwg]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/04/16/svg-news-digest-2008-04-16/</guid>
		<description><![CDATA[I haven&#8217;t really given a good &#8216;SVG News Digest&#8217; in well over a year, but there was enough recent news that I thought I should post a little bit about what&#8217;s going on in the Scalable Vector Graphics world. Fair warning: This blog post is long, I probably should have spread it over 4-5 days [...]]]></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>I haven&#8217;t really given a good &#8216;SVG News Digest&#8217; in well over a year, but there was enough recent news that I thought I should post a little bit about what&#8217;s going on in the <a href="http://www.w3.org/Graphics/SVG">Scalable Vector Graphics</a> world.  Fair warning:  This blog post is long, I probably should have spread it over 4-5 days worth of blogging, but I lose patience when queuing up posts&#8230;<span id="more-454"></span></p>
<h3 id="toc">Table Of Contents</h3>
<ul>
<li><a href="#svg-in-html">SVG In HTML: Did You Blink?</a></li>
<li><a href="#svg-wg-going-public">SVG Working Group Going Public</a></li>
<li><a href="#smil-getting-some-love">SMIL Getting Some Love</a></li>
<li><a href="#gemi">Cool Demo: GEMi</a></li>
<li><a href="#slanty-comments">Slanty Blog Comments</a></li>
</ul>
<h3 id="svg-in-html"><a href="#svg-in-html">SVG In HTML:  Did You Blink?</a></h3>
<p><object type="image/svg+xml" width="100" height="100" align="left" hspace="10" data="http://codedread.com/clipart/html.svgz"><span/></object>For about a week, there was a <a href="http://annevankesteren.nl/2008/04/html5-foreign">pretty solid proposal</a> for how <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5</a> could include support for existing popular XML languages currently making up the fabric of the &#8216;open web&#8217; platform &#8211; this included Scalable Vector Graphics.</p>
<p>Specifically, the spec described how HTML5 could allow inline markup that (very closely) resembled SVG and MathML (in a special mode of the HTML5 parser).  However, very recently, the <a href="http://lists.w3.org/Archives/Public/public-html/2008Apr/0392.html">SVG WG requested</a> the SVG part of the proposal be <a href="http://intertwingly.net/blog/2008/04/15/HTML5-SVG">removed</a> from the HTML5 spec so that the SVG WG could investigate if there were any improvements that could be made that would preserve interoperability with existing user agents and tools.</p>
<p>My biggest concern about the original proposal was that &#8217;round-tripping&#8217; SVG images was not guaranteed.  Round-tripping means that I should be able to take a valid SVG document made in an editor like <a href="http://inkscape.org/">Inkscape</a> and copy-paste that XML code into an HTML5 document and vice versa.  The trip from Inkscape-to-HTML was supported by the original proposal (where the HTML parser would just ignore namespace prefixes).  But the trip the other way (copy-paste from a HTML5+SVG document to Inkscape) was not guaranteed.</p>
<p>This is because the HTML5 parser is much more forgiving about certain things.  It does not mandate namespace prefixes, double-quotes on attribute values, or case sensitivity for all modes.  It doesn&#8217;t even require you to close all your elements.  This is by design.</p>
<p>This means that an author could not be guaranteed to take valid SVG markup embedded in HTML5 and paste it into a standalone document and expect a graphical editor to be able to bring up the image.</p>
<p>However, if we require that any browser supporting SVG-in-HTML5 must support a means of exporting the DOM as XML &#8211; then my concerns are very much alleviated.  It <a href="http://lists.w3.org/Archives/Public/public-html/2008Apr/0414.html">was clarified</a> to me that this was indeed recommended, but it could not be a requirement because User <del>Agent</del> <ins>Interface</ins> requirements are out of scope of the HTML5 specification.  <del>I&#8217;m not really sure why &#8211; we are not talking about capturing all UA requirements, only those that are required for interoperability with a foreign language such as SVG &#8211; but c&#8217;est la guerre.</del>  See <a href="http://blog.codedread.com/archives/2008/04/16/svg-news-digest-2008-04-16/#comment-12518">Ian&#8217;s comment</a> below for more clarity.</p>
<h3 id="svg-wg-going-public"><a href="#svg-wg-going-public">SVG Working Group Going Public</a></h3>
<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/svg.svgz"><span/></object>The <a href="http://www.w3.org/Graphics/SVG/WG/">SVG Working Group</a> has been <a href="http://lists.w3.org/Archives/Public/www-svg/2008Apr/0048.html">rechartered</a> as a <em>Public</em> Working Group.  This means that the general public will be able to read emails, conference transcripts, action items, etc.  I really think this is a great idea, and I look forward to more transparency around SVG activities.  Here&#8217;s their <a href="http://www.w3.org/2007/11/SVG_rechartering/SVG-WG-charter.html">new charter</a>.</p>
<p>Another activity within the W3C surrounding SVG is the creation of a <a href="http://www.w3.org/Graphics/SVG/IG/">SVG Interest Group</a>.  This is an interesting idea &#8211; not sure if it&#8217;s the first of its kind within the W3C.  Based on <a href="http://www.w3.org/2007/11/SVG_rechartering/SVG-IG-charter.html">their charter</a>, the IG will:</p>
<blockquote cite="http://www.w3.org/2007/11/SVG_rechartering/SVG-IG-charter.html#scope"><p>&#8220;provide requirements, specification feedback, errata suggestions and tests to the SVG WG&#8221;</p>
</blockquote>
<p>Sounds like a good opportunity to gather more folks interested in vector graphics on the web into one place for some interaction.</p>
<h3 id="smil-getting-some-love"><a href="#smil-getting-some-love">SMIL Getting Some Love</a></h3>
<p><object type="image/svg+xml" width="100" height="100" align="left" hspace="10" data="http://codedread.com/clipart/smile.svgz"><span/></object>In case you <a href="http://blog.codedread.com/archives/2008/03/26/webkit-nightly-not-smiling/">missed it</a>, the <a href="http://www.webkit.org/">WebKit</a> nightly builds now includes some support for declarative animation (SMIL).  I&#8217;m really pleased to see two native browsers now supporting SVG animation interoperably.  Now I&#8217;d like to see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=216462">this patch</a> land as soon as Firefox 3 ships so that we can have some declarative animation support in all 3 major native SVG browsers.</p>
<h3 id="gemi"><a href="#gemi">Cool Demo: GEMi</a></h3>
<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/party.svgz"><span/></object>Domenico Strazzullo <a href="http://tech.groups.yahoo.com/group/svg-developers/message/60327">announced</a> today <a href="http://www.dotuscomus.com/svg/lib/gemi/v1.29/gemi.svg">a very nice demo</a> of a windowing system built in SVG for browsers.  Kind of reminds me of <a href="http://www.ajaxwindows.com/apps/windows/content/index.html">AjaxWindows</a>, but this GEMi demo actually works really well in all 3 major SVG browsers without the help of XUL.  Apparently it also works in IE+ASV.</p>
<p>I was really impressed with this &#8211; but I can&#8217;t wait to see if anybody tries to build anything with it, since the goal of the project was a framework that can be integrated into some other project.</p>
<p><a href="http://www.dotuscomus.com/svg/lib/gemi/v1.29/gemi.svg"><b>Click here to try it out</b></a>!</p>
<h3 id="slanty-comments"><a href="#slanty-comments">Slanty Blog Comments</a></h3>
<p><object type="image/svg+xml" width="100" height="100" align="left" hspace="10" data="http://codedread.com/clipart/wordpress.svgz"><span/></object>More blog experimentation last night by adding &#8216;slanty comments&#8217;.  After futzing with PHP, CSS, HTML and SVG, I finally got the effect I was after.  It took me over 2 hours.  Of course that was also testing it in Firefox 2, Firefox 3, Safari 3.1, Opera 9.20, WebKit nightly, Internet Explorer 6 and on two platforms (Windows and Linux).</p>
<p>Unfortunately, when all was said and done, I wasn&#8217;t really happy with <a href="http://blog.codedread.com/archives/2008/04/01/giving-flash-a-chance/#comments">the result</a>.  Maybe I&#8217;m just not used to seeing that on a website?  If anybody has ideas on how to improve it, I&#8217;ll gladly steal them.</p>
<p>What I thought was really interesting about this?  Well first, let me explain how I serve my website and blog:  I author my content in XHTML served the content as application/xhtml+xml for those browsers that support it (which is, incidentally, all major browsers except for Internet Explorer).  For IE, I simply change the MIME type to text/html and cross my fingers (ok, in fairness, I did do some tweaking and did design a horrid little HTML table-based fallback menu).</p>
<p>Anyway, for my slanted comment links, I use inline SVG.  Here is a snip of the code for a blog comment:</p>
<p style="background-color:#ddd"><code style="text-align:left; font-size:10pt;">&#160;&#160;&#60;div&#62;</p>
<p>&#160;&#160;&#160;&#160;&#60;svg xmlns="http://www.w3.org/2000/svg" ...&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#60;a href="http://example.com/" xlink:href="http://example.com/" ...&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;text ...&#62;1. Joe Blow Says:&#60;/text&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#60;/a&#62;</p>
<p>&#160;&#160;&#160;&#160;&#60;/svg&#62;</p>
<p>&#160;&#160;&#60;/div&#62;</p>
<p>&#160;&#160;&#60;div&#62;</p>
<p>&#160;&#160;&#160;&#160;&#60;p&#62;... comment text goes here ...&#60;/p&#62;</p>
<p>&#160;&#160;&#60;/div&#62;</code></p>
<p>Most browsers (IE included) simply ignore elements they do not recognize.  So how does the above look to IE6?  See the bold markup below:</p>
<p style="background-color:#ddd"><code style="text-align:left; font-size:10pt;"><b>&#160;&#160;&#60;div&#62;</b></p>
<p>&#160;&#160;&#160;&#160;&#60;svg xmlns="http://www.w3.org/2000/svg" ...&#62;</p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#60;a href="http://example.com/"</b> xlink:href="http://example.com/" <b>...&#62;</b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#60;text ...&#62;<b>1. Joe Blow Says:</b>&#60;/text&#62;</p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#60;/a&#62;</b></p>
<p>&#160;&#160;&#160;&#160;&#60;/svg&#62;</p>
<p><b>&#160;&#160;&#60;/div&#62;</p>
<p>&#160;&#160;&#60;div&#62;</p>
<p>&#160;&#160;&#160;&#160;&#60;p&#62;... comment text goes here ...&#60;/p&#62;</p>
<p>&#160;&#160;&#60;/div&#62;</b></code></p>
<p>So the svg:a element looks like a html:a element to IE.  So in this one case, my inline SVG kinda sorta falls back as HTML content for the one browser that doesn&#8217;t support SVG (again, Internet Explorer).  Yes, I know &#8211; horrible horrible horrible.  However, it works.  I kind of shudder to think what this would do in IE8 (without an SVG plugin), I guess I&#8217;ll have to test it eventually.</p>
<p>Oh, and if you don&#8217;t know what I mean by slanty comments, well you&#8217;ll just have to post a comment&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/04/16/svg-news-digest-2008-04-16/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More Importantly&#8230;</title>
		<link>http://www.codedread.com/blog/archives/2008/03/09/more-importantly/</link>
		<comments>http://www.codedread.com/blog/archives/2008/03/09/more-importantly/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 17:08:58 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[w3c]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/03/09/more-importantly/</guid>
		<description><![CDATA[From a discussion that started with bitterness and vitriol and half-flames came forth a semi-useful discussion in which I was a mere observer. To me, the pinnacle of usefulness came with Henri Sivonen&#8217;s post which contained a list of use cases. Here was an important one Making Flash-like visually “high-impact” (sorry about the marketing BS [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/html.svgz"><span/></object>From a <a href="http://intertwingly.net/blog/2008/03/07/Design-By-Attrition">discussion</a> that started with bitterness and vitriol and half-flames came forth a semi-useful discussion in which I was a mere observer.  To me, the pinnacle of usefulness came with <a href="http://hsivonen.iki.fi/">Henri Sivonen&#8217;s</a> post which contained a list of use cases.  Here was an important one <span id="more-439"></span></p>
<blockquote style="clear:both" cite="http://intertwingly.net/blog/2008/03/07/Design-By-Attrition#c1205058801"><p>Making Flash-like visually “high-impact” (sorry about the marketing BS term) sites using the openly specified Web platform but without the Draconianness of XML in such a way that the whole thing uses retained-mode graphics and lives in one DOM for easy scripting (i.e. no need for scripts to deal with object or iframe sub-DOMs).</p></blockquote>
<p> (<a href="http://intertwingly.net/blog/2008/03/07/Design-By-Attrition#c1205058801">link</a>)</p>
<p>I guess that&#8217;s what I want&#8230; but more important to me than removing the &#8220;Draconianness of XML&#8221; is that <strong>I want this stuff to work in every major browser on every major platform</strong>.  And no amount of specifying can guarantee that.  It takes willingness of all participants.  I use the term &#8220;participants&#8221; here in a broad sense, because based on the first IE8 Beta, it seems that <a href="http://annevankesteren.nl/2008/03/ie8-bad">Microsoft is not really working in close communication</a> with the HTML Working and Web Application Formats Working Groups.  The WG seems to be trapped in a constant state of reverse-engineering the things that Microsoft has done and sadly I don&#8217;t see this changing in the future.</p>
<p>Can an open specification really compete with a company that can throw gobs of money at developing a glitzy-but-proprietary standard, who then proceed to throw <a href="http://blogs.msdn.com/somasegar/archive/2008/01/07/2008-olympics-brought-to-you-by-silverlight.aspx">gobs</a> and <a href="http://www.gcn.com/print/27_2/45710-1.html">gobs</a> of money at organizations to use that new standard?  Further reading:  Sam Ruby&#8217;s <a href="http://www.intertwingly.net/blog/2008/01/26/SVG-Shiv">SVG Shiv</a>.</p>
<p>Sorry, I guess that was my cheery thought for the day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/03/09/more-importantly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Yet More on SVG in text/html</title>
		<link>http://www.codedread.com/blog/archives/2007/10/19/yet-more-on-svg-in-texthtml/</link>
		<comments>http://www.codedread.com/blog/archives/2007/10/19/yet-more-on-svg-in-texthtml/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 14:17:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/10/19/yet-more-on-svg-in-texthtml/</guid>
		<description><![CDATA[Lots of talk these days about allowing SVG inline with text/html content. I thought I&#8217;d try and put some thoughts down. Start with Doug&#8217;s excellent post on this topic. I don&#8217;t have any opinion on the aria-specific elements of the debate. I&#8217;m fine with either adding a namespace to these attributes when used in XML [...]]]></description>
			<content:encoded><![CDATA[<p><object class="clip" type="image/svg+xml" data="http://www.codedread.com/clipart/svg.svgz"><span/></object>Lots of talk these days about allowing <a href="http://www.w3.org/Graphics/SVG/" title="Scalable Vector Graphics">SVG</a> inline with text/html content.  I thought I&#8217;d try and put some thoughts down.  <span id="more-400"></span></p>
<p><a id="p1"></a>Start with <a href="http://www.schepers.cc/?p=46">Doug&#8217;s</a> excellent post on this topic.  I don&#8217;t have any opinion on the aria-specific elements of the debate.  I&#8217;m fine with either adding a namespace to these attributes when used in XML or letting those attributes attach themselves to the SVG language without a namespace if it simplifies things, I don&#8217;t see a need to update the SVG specification for this though.  I also don&#8217;t see a need to reinvent or create a new namespacing mechanism using underscores or dashes, this seems silly and/or dangerous to me.</p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p><a id="p2"></a>But there&#8217;s something I&#8217;m not getting about the recent discussion of allowing inline SVG in text/html (or HTML5).  <a href="http://annevankesteren.nl/2007/10/svg-html#xpointer(string-range(/,syntax%20simple))">Anne</a> seems to be of the opinion that it would be a good opportunity to simplify the SVG language &#8211; maybe eliminate namespaces, allow upper-case SVG elements.  Kind of an &#8220;if you want to play in the HTML playground, you have to wear the right kind of sneakers&#8221; attitude.  This is kind of like HTML abusing its monopoly, isn&#8217;t it?</p>
<p><a id="p3"></a>I don&#8217;t think this is a good idea.  If you allow &#60;CIRCLE CX=40&#62; to be the same thing as &#60;circle cx=&#8221;40&#8243;/&#62; eventually we&#8217;ll start to see people producing non-compliant SVG in the wild.  Then we&#8217;ll have people creating inline SVG for HTML that won&#8217;t work in the many SVG tools and viewers that are already out there and we&#8217;ll just have frustrated authors.  Then some tools might feel forced to accommodate the lax HTML-style of SVG, just like the mess we have now with browsers trying to understand as much content as they can in order to compete.   Then we&#8217;ll have to rewrite the SVG spec so that SVG has two serializations (like we&#8217;re having to do with HTML5/XHTML5).  It just seems to be going at it backwards, since SVG was designed from the ground up as an XML technology.  Must we rewrite all XML specifications into HTML5-style languages in order to get inlining?  I don&#8217;t think so.</p>
<p><a id="p4"></a>I guess I don&#8217;t fully understand why the HTML5 parser can&#8217;t just have the ability to hand off the character stream to another parser when it encounters some &#8220;special&#8221; elements like &#60;svg&#62; or &#60;math&#62;.  Why does everything have to be in the hands of the HTML5 parser?  In other words, in the document:</p>
<div class="code">
<p>&#60;!doctype html&#62;</p>
<p>&#60;html&#62;</p>
<p>&#60;title&#62;SVG in text/html&#60;/title&#62;</p>
<p>&#60;p&#62;</p>
<p>A green circle:</p>
<p>&#60;svg xmlns=&#8221;http://www.w3.org/2000/svg&#8221; &#62;</p>
<p>&#160;&#160;&#60;circle r=&#8221;50&#8243; cx=&#8221;50&#8243; cy=&#8221;50&#8243; fill=&#8221;green&#8221;/&#62;</p>
<p>&#60;/svg&#62;</p>
<p>&#60;/p&#62;</p>
<p>&#60;/html&#62;</p>
</div>
<p><a id="p5"></a>Upon encountering the characters &#8220;&#60;svg &#8220;, the parser should back up five characters and send the bytes to the browser&#8217;s parser that handles content with the MIME type image/svg+xml.  When that parser is complete, those elements can be injected into the DOM in the proper namespace and the HTML5 parser can pick up after &#60;/svg&#62;</p>
<p>I see some problems, none of which seem insurmountable to me:</p>
<ol id="p6">
<li>If the browser has no SVG parser, then what should happen?  My proposal here is that all HTML5 browsers must also include a bog-standard XML parser to handle inline content that is known to be XML.  This should be pretty straightforward, since XML parsing is actually much simpler than HTML5 parsing.  In the case of a browser not grokking SVG, it throws the character stream to the bog-standard XML parser and waits for the character stream to return to it.  Whether those elements are injected into the DOM is up to that browser (a browser could inject the foreign elements into the DOM even if it doesn&#8217;t know how to render them).</li>
<li>I hear that some browser don&#8217;t properly handle namespaced content or colons or something.  Can someone clarify which browsers?  Can someone further clarify what exactly the problems are?  Can someone confirm if that browser will have fixed itself, say, next year would we be good to go?</li>
<li>Maybe the biggest problem with this idea is defining what happens in error scenarios &#8211; i.e. when the SVG is malformed, then at what point does the SVG parser return the character stream back to the HTML parser.  In other words, maybe the challenge here would be in defining how parsers need to behave towards each other when mixing MIME types.  Anybody have a suggestion here?  Is this the deal-breaker?</li>
</ol>
<p><a id="p7"></a>As for namespace removal &#8211; why?  Seriously just because it&#8217;s hard to remember it?  If we&#8217;re trying to get to a &#8220;cut-and-paste&#8221; environment for some web authors, then they can just cut and paste the whole thing (namespace definitions in &#60;svg&#62; element and all).  Maybe it&#8217;s because I&#8217;m used to writing SVG, but I really don&#8217;t have a problem with the concept of mixed namespace content.  <a href="http://intertwingly.net/blog/2007/10/18/SVG-in-HTML-Momentum-Building">Sam&#8217;s</a> off-the-cuff solution seems to favor even skipping the &#60;svg&#62; element, which would seem to me to cause a mess of problems.  Where would you define the viewBox?  Where would you define the version of the SVG language?  You couldn&#8217;t, for example, cut and paste his &#8220;inlined&#8221; SVG content into a standalone SVG document for editing and be guaranteed it will even display properly, even if you wrapped it in a simple &#60;svg/&#62; element.</p>
<p><a id="p8"></a>It seems like the belief that XHTML being a failure is a reflection on XML-on-the-web in general.  In fact, all browsers except for IE can handle application/xhtml+xml MIME type these days, so it really seems to me that the verdict&#8217;s still out on whether XHTML is a good technology or not.  Some people out there still think that XML has a place on the web.  People like <a href="http://burningbird.net/">Shelley</a>, who also shares her thoughts on SVG in text/html <a href="http://burningbird.net/technology/svg-onward/">here</a>.</p>
<p><a id="p9"></a>I think we should explore relaxing the draconian error handling on XML on the web, but I don&#8217;t agree with <strike>re-inventing</strike> changing XML languages into HTML-style languages one after another.</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/19/yet-more-on-svg-in-texthtml/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

