<?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>Reinventing Fire &#187; Tech</title>
	<atom:link href="http://schepers.cc/category/tech/feed" rel="self" type="application/rss+xml" />
	<link>http://schepers.cc</link>
	<description>Technology upside down and backwards</description>
	<lastBuildDate>Sun, 09 Oct 2011 19:47:13 +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>Getting In Touch</title>
		<link>http://schepers.cc/getintouch</link>
		<comments>http://schepers.cc/getintouch#comments</comments>
		<pubDate>Sat, 29 Jan 2011 20:15:48 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[TouchTablet]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=439</guid>
		<description><![CDATA[<br/>Last week, I published the first draft (and subsequent updates) of the Web Interface specification, which defines touch events. This is the first spec from the new W3C Web Events Working Group. Peter-Paul Koch (PPK) gave it a positive initial review. Apparently, others thought it was news-worthy as well, because there were a few nice [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Last week, I published the <a href="http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html">first draft (and subsequent updates) of the Web Interface specification</a>, which defines touch events.  This is the first spec from the new <a href="http://www.w3.org/2010/webevents/">W3C Web Events Working Group</a>.</p>
<p>Peter-Paul Koch (PPK) gave it a <a href="http://www.quirksmode.org/blog/archives/2011/01/w3c_touch_event.html">positive initial review</a>.  Apparently, others thought it was news-worthy as well, because there were a few nice write-ups in various tech sites.  Naturally, <a href="http://news.cnet.com/8301-30685_3-20029864-264.html">cnet&#8217;s Shank scooped it first</a> (he has his ear to the ground), and it was fairly quickly picked up by <a href="http://www.macgasm.net/2011/01/28/w3c-turns-eye-touchbased-web-apps/">macgasm</a>, <a href="http://www.electronista.com/articles/11/01/28/w3c.readies.standard.for.web.ui.on.phones.tablets/">electronista</a>, and <a href="http://www.webmonkey.com/2011/01/w3c-touch-events-specification-targets-tablets-touch-screens/">Wired webmonkey</a>.</p>
<p>I thought I&#8217;d go into a few of the high-level technical details and future plans for those who are interested.<br />
<span id="more-439"></span><br />
Touch interfaces are nothing novel, nor is using them with Web content, but there are enough differences from mouse interaction that specifying them should lead to easier development and better user experiences on the Open Web platform (or in HTML5 webapps, if you prefer that buzzword).</p>
<p>The most important thing to note for multi-touch events (using more than one finger, say) is that you want the different touch-points to be considered together, not as completely unrelated events.  The WebKit implementation, used in the iPhone and Droid smartphones, as well as many, many others, used a good model for this, with each event exposing lists of currently-active individual touch-points; with wide deployment of WebKit already, it was an obvious starting point.  PPK&#8217;s blog post was off on one minor detail here: while I did base the spec on WebKit&#8217;s behavior, I didn&#8217;t base it directly off of Apple&#8217;s documentation; I wrote it from scratch, for better or worse, and extended it for broader applicability.  </p>
<p>One of these extensions was to take PPK&#8217;s suggestion to add &#8216;touchenter&#8217; and &#8216;touchleave&#8217; events, the equivalent of the &#8216;mouseenter&#8217; and &#8216;mouseleave&#8217; events that we finally specified in DOM3 Events, which work much more intuitively than &#8216;mouseover&#8217; and &#8216;mouseout&#8217;.</p>
<p>I also extended the WebKit model to add &#8216;radiusX&#8217; and &#8216;radiusY&#8217; attributes, to indicate the general size and shape of the thing that touched the surface&#8230; say, a fingertip or a stylus (a fancy way of saying &#8220;pen-like stick&#8221;), described as an ellipse.  I&#8217;ve been soliciting use cases and requirements for a couple of years, and this is meant to cover a similar request across different devices.</p>
<p>That leads me to mention the other use case for this specification: pen-tablets.  Almost a decade ago, I was writing a browser-based SVG editor called SVG-Whiz (long since decomposed into digital fertilizer), and I wanted to be able to use my Wacom tablet with it.  It worked okay as a mouse replacement, but I had to choose the stroke-width manually&#8230; I couldn&#8217;t use the tablet&#8217;s built-in pressure sensitivity.</p>
<p>We&#8217;re about to change that.  Another change to the WebKit model is the addition of a &#8216;force&#8217; attribute to indicate the level of pressure used on the touch or tablet interface.  This will be useful for SVG or Canvas API drawing apps, games, and myriad other purposes.  For example, most touch screens don&#8217;t have the capability to detect hovering (some capacitive screens being the exception)&#8230; this is a challenge for accessibility, but perhaps the pressure sensitivity—expressed in the &#8216;force&#8217; attribute—could be applied to that end.  We may specify a new related CSS mode, or simply define when existing ones apply, such as triggering the CSS &#8216;:hover&#8217; pseudoclass past a certain pressure threshold (device-specific and user configurable, of course).</p>
<p>(On the subject of new CSS properties, Nokia has made the suggestion of <a href="http://www.starlight-webkit.org/CSS/css3-haptics.html">haptic feedback properties for touchscreens</a>, based on their implementation.  This could be a very interesting addition to touch interfaces, even if it&#8217;s not available on all devices.  That work would be handled by the CSS Working Group.)</p>
<p>In addition to pressure-sensitivity, pen input has other characteristics that distinguish it from touch, including the angle of the pen, so we may add that as well.  Pen-inputs, either through tablets or stand-alone digital pens, often include particular mode-shifting buttons, so we have added attributes to detect when the alt, shift, and control keys (or buttons) have been pressed.  </p>
<p>So, to cover a wide range of devices, we will be defining some capabilities beyond basic touchscreens: multi-touch, touch area, force, perhaps pen-angle, and even haptic feedback.  Not every feature will be available for every device, but they will be useful for those that do, but we want the spec to be future-proof and device-independent.</p>
<p>This leads me to another touchy area: gestures.  One of the common requests I&#8217;ve gotten is to add events for specific gestures, like pinch, swipe, twist, flick, etc.  There are two problems with trying to standardize this right now:</p>
<ol>
<li>Each device and each platform has its own gestures, sometimes several to do the same thing, and there is still room for innovation there;</li>
<li>It&#8217;s a patent minefield.</li>
</ol>
<p>Instead, we intend to specify higher-level &#8220;intentional&#8221; events, like zooming in or out, panning, navigating, editing, etc., and define a way to map between the physical actions (touching the screen and moving your fingers) and the intention event (zooming in); it also means we can map between input on other devices, like keyboard and mouse, and the intent behind those actions.  An additional aspect of this is another proposal by Nokia, the <a href="http://lists.w3.org/Archives/Public/public-webevents/2011JanMar/att-0002/TransformActionProposal.html">transform action events</a>; these match the transforms in SVG and CSS, such as translateX and translateY, scale, and rotate, and add the ability to detect the rate of the actions.  Having all these high-level events will ultimately make it much easier to author content and applications that work on multiple devices. </p>
<p>And though gestures are different on each device, we do plan to create an informative document detailing some common ones, perhaps something like the excellent <a href="http://www.lukew.com/ff/entry.asp?1071">Touch Gesture Reference Guide</a> by Luke Wroblewski, Craig Villamor, and Dan Willis.  That might eventually lead to some industry consensus about future efforts to define gesture events.</p>
<p>Last but not least, one of the additions I made to the spec after the first draft was to add my co-editors, Sangwhan Moon from Opera and Matt Brubeck from Mozilla, both of whom have already made excellent suggestions we&#8217;ve integrated into the spec, and who have volunteered to help me write the spec.  It&#8217;s a positive sign that we&#8217;ve got active participation from so many different browser-engine developers, since interoperability here is the most important thing.</p>
<p>For me, this specification has been about a decade in the making&#8230; it&#8217;s one of the things I wanted to tackle when I first came to W3C, even before I worked there.  So, I&#8217;m very excited to finally be doing it, and to help make touchscreens and pen-tablets part of the Open Web platform.  With some hard work and a little luck, we could get this spec completed and implemented in browsers by early next year.</p>
<p>So, if you are interested in helping us make sure the Touch Interface spec meets  your needs as a user, developer, or implementer&#8230; <a href="mailto:public-webevents@w3.org">get in touch</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/getintouch/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Translation Services at a Loss for Words</title>
		<link>http://schepers.cc/translatesvg</link>
		<comments>http://schepers.cc/translatesvg#comments</comments>
		<pubDate>Tue, 16 Nov 2010 03:27:15 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=399</guid>
		<description><![CDATA[<br/>Text in SVG is text. Visually, you can use webfonts like WOFF or SVG Fonts (where they are supported, like in Opera or the iPhone) to make it look cool, and you can style both the stroke and fill to make it all fancy, or apply filters to pop it out or make it glow [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Text in SVG is text.  Visually, you can use webfonts like <a href="http://www.w3.org/TR/WOFF/">WOFF</a> or SVG Fonts (where they are supported, like in Opera or the iPhone) to make it look cool, and you can style both the stroke and fill to make it all fancy, or <a href="http://svg-wow.org/filterEffects/chiseled.svg">apply filters</a> to pop it out or make it glow or give it a dropshadow, but it&#8217;s not just a raster image like many text headers&#8230; it&#8217;s human- and machine-readable text, as nature intended.</p>
<p>So, SVG is translatable, right?<br />
<span id="more-399"></span><br />
I wanted to make that point in my talk yesterday at <a href="http://east.webdirections.org/2010/en/program/">Web Directions East</a>, here in Tokyo, so I thought I&#8217;d translate <a href="http://www.w3.org/2010/Talks/11-schepers-webdirectionseast/text.svg">my slide on text in SVG</a><br />
 in real time (<em>note: click the down arrow to step through the bullet points</em>).  But testing it beforehand (I&#8217;m glad I did some prep), neither <a href="http://translate.google.com/translate?js=n&#038;prev=_t&#038;hl=en&#038;ie=UTF-8&#038;layout=2&#038;eotf=1&#038;sl=auto&#038;tl=ja&#038;u=http%3A%2F%2Fwww.w3.org%2F2010%2FTalks%2F11-schepers-webdirectionseast%2Ftext.svg">Google</a> nor <a href="http://www.microsofttranslator.com/bv.aspx?from=&#038;to=en&#038;a=http%3a%2f%2fwww.w3.org%2f2010%2fTalks%2f11-schepers-webdirectionseast%2ftext.svg">Bing</a> even try to translate it.  <a href="http://babelfish.yahoo.com/translate_url?doit=done&#038;tt=url&#038;intl=1&#038;fr=bf-home&#038;trurl=http%3A%2F%2Fwww.w3.org%2F2010%2FTalks%2F11-schepers-webdirectionseast%2Ftext.svg&#038;lp=en_ja&#038;btnTrUrl=Translate">Yahoo&#8217;s Babel Fish</a> at least returns the original page, though it doesn&#8217;t take the extra little step of doing any actual translation.</p>
<p>Lame.</p>
<p>Why don&#8217;t they translate it?  Bing offers this helpful explanation:</p>
<blockquote><p><a href="http://www.microsofttranslator.com/help/#q2q">What text formats are supported?</a><br />
Html and Text. The viewer will not translate text on images, in PDFs, or in Flash graphics and animation. It may also not translate some dynamically generated text, such as in cascading menus.</p></blockquote>
<p>I expected this to work, since <a href="http://googlewebmastercentral.blogspot.com/2010/08/google-now-indexes-svg.html">Google now indexes SVG</a>; as I mentioned in a <a href="http://schepers.cc/formata-non-grata">previous blog post</a>, I made a <a href="http://schepers.cc/svgaccessibility.html">test page back in 2002</a> that sorta conflated the two services, indexing and translating.  But obviously, these are two different tools, and need to be fixed separately.</p>
<p>It would be easy to fix, I&#8217;d expect&#8230; simply add SVG to the list of allowed file types, and translate the text content of each element, just as they do with HTML.  If they actually special-case different element types, that would add slightly more work, but not a lot&#8230; just as with the task of indexing, you would pay attention to the content of the <code>&lt;text&gt;</code>, <code>&lt;tspan&gt;</code>, <code>&lt;textPath&gt;</code>, <code>&lt;title&gt;</code>, and <code>&lt;desc&gt;</code> elements.</p>
<p>It&#8217;s ironic that this doesn&#8217;t work, because on my way back from Lyon last week, I happened to meet <a href="http://www.linkedin.com/profile/view?id=2611357">Bert Esselink</a>, the author of a <a href="http://books.google.com/books?id=QxFg5AC_JZIC&#038;lpg=PP1&#038;ots=lXLrkbuy8-&#038;dq=bert%20Esselink&#038;pg=PP1#v=onepage&#038;q&#038;f=false">book on localization</a> who works for the translation company Lionbridge, and he and I chatted about how they use SVG extensively for their translation work.</p>
<p>In the end, I just had a native speaker translate a couple of text passages (the automatic translations were apparently not very good) and included them in my slide, just to serve as a placeholder. But I&#8217;m hopeful that soon I can demo the automatic translation live.  It would be especially useful to people looking at SVG infographics, to be able to see charts and graphs in their native tongue.</p>
<p><object type="image/svg+xml" width="485" height="485" data="http://schepers.cc/svg/search-engine-infographic.svg">Please use a modern browser.</object></p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/translatesvg/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Map is not Proprietary</title>
		<link>http://schepers.cc/map-not-proprietary</link>
		<comments>http://schepers.cc/map-not-proprietary#comments</comments>
		<pubDate>Fri, 20 Aug 2010 21:34:31 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Maps]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=337</guid>
		<description><![CDATA[<br/>Korzybski remarked that &#8220;the map is not the territory&#8221;, reminding us that we shouldn&#8217;t confuse our mental models for reality. But maps, and data visualizations of all kinds, are really powerful, conveying complex ideas easily, and even shaping (or misshaping) perceptions about facts. This is one reason why decentralization of mapping resources and services is [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Korzybski remarked that &#8220;the map is not the territory&#8221;, reminding us that we shouldn&#8217;t confuse our mental models for reality.  But maps, and data visualizations of all kinds, are really powerful, conveying complex ideas easily, and even shaping (or misshaping) perceptions about facts.  This is one reason why decentralization of mapping resources and services is good; no one organization should control our common maps.</p>
<p>SVG is a natural fit for mapping.  There&#8217;s even a detailed proposal by KDDI&#8217;s Satoru Takagi-sensei for <a href="http://blog.svg-map.com/2009/09/tiling-and-laye.html">tiling, layering, and coordinate resolution</a> that fits on top of SVG, which I&#8217;d like to see standardized.</p>
<p>I&#8217;ve had an idea for a small open-source project for a while, which I&#8217;ve discussed with the brilliant Andreas Neumann of <a href="http://www.carto.net/">Carto.net</a>; he&#8217;s been too busy planning SVG Open every year to help out with it thus far, and I don&#8217;t have the skills to do it without a great investment in time.<br />
<span id="more-337"></span><br />
The idea is simple: there are lots of static SVG maps of various countries, states, etc. that are freely available (for example, on <a href="http://en.wikipedia.org/wiki/Wikipedia:Blank_maps">Wikipedia</a>).  Some effective data visualizations can be made with these (color-coding countries, etc.), but they are by necessity very simple. Content creators can&#8217;t use such maps to pinpoint specific locations (long/lat), because they don&#8217;t know the projection&#8230; the maps are purely visual, not topographical (if that&#8217;s the right word).</p>
<p>There are more heavy-weight solutions, like <a href="http://www.openstreetmap.org/">OpenStreetMap</a>, which is awesome, but more than most people need for very simple location-sensitive webapps.</p>
<p>What I would like to do is have a very simple set of basic maps, with low-to-medium level of detail, all with the same projection, and to provide a Javascript utility that converts back and forth between long/lat and the coordinate space of the image.  There would be one world map, and a map for each country, and a map for each major region within each country (in the US, this would be states).</p>
<p>For example, using this script and some of these premade maps, I could make a little webapp that allows members of a social network (e.g. a developer community, or people who share a hobby) to type in their location (long/lat), and it would stick a &#8220;pin&#8221; in the map at that location.  They could see the high level overview at the world level (100 people in the US, 20 in Japan, 72 in Europe, etc.), and easily drill to the country level (click on US and open that map, showing 20 in California, 5 in North Carolina), and drill down again to the region level (showing the distribution of pins in North Carolina).</p>
<p>It would not go down to the city level, or show regional features like roads or lakes&#8230; that gets too complex, and there are other applications to do that.  However, it would include projection metadata and instructions for each region (which the conversion script might use), and the project would make it possible for someone to export their own GIS data into this simplified format by providing instructions (for, say, ArcGIS).</p>
<p>This is something I think could appeal to people on a very high-level, making SVG easier to understand and use for simple projects like this; I want to improve the reusability of SVG in this way.</p>
<p>And I think the stellar <a href="http://mike.teczno.com/">Michal Migurski </a>of <a href="http://stamen.com/">Stamen Design</a>, and <a href="http://simplegeo.com/">SimpleGeo</a>, have just scooped me.  I haven&#8217;t looked into the details yet, but they just <a href="http://blog.simplegeo.com/post/983045400/announcing-polymaps">announced</a> the launch of <a href="http://polymaps.org/">PolyMaps</a>, a free and simple SVG and Javascript mapping library.  Curse and bless you, you maptastic bastards!</p>
<p>Oh, and in case PolyMaps doesn&#8217;t completely fit what I described above, let talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/map-not-proprietary/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting to the Point</title>
		<link>http://schepers.cc/getting-to-the-point</link>
		<comments>http://schepers.cc/getting-to-the-point#comments</comments>
		<pubDate>Tue, 13 Jul 2010 15:18:15 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG 2]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=243</guid>
		<description><![CDATA[<br/>SVG paths have a pretty good set of shape commands, enough to let you draw any 2D shape you might want in an authoring tool: horizontal, vertical, and diagonal straight lines, elliptical arc segments, and cubic and quadratic Bézier curves. Béziers are great, giving you precise control over the position and curve interpolation of each [...]]]></description>
			<content:encoded><![CDATA[<br/><p>SVG paths have a pretty good set of shape commands, enough to let you draw any 2D shape you might want in an authoring tool:  horizontal, vertical, and diagonal straight lines, elliptical arc segments, and cubic and quadratic Bézier curves.  Béziers are great, giving you precise control over the position and curve interpolation of each point in a concise format, using control points (&#8220;handles&#8221;), and are easily chained together to create complex shapes.</p>
</p>
<p>But let&#8217;s say you have a series of points, and you want to draw a smooth line between them, e.g. for stock data, an audio wave, or a mathematical graphing equation.  Béziers are not as handy there, because not all the points needed to define a Bézier spline are on the curve itself.  Obviously, you can decompose any set of points into a set of Béziers, but that takes math, and who wants to do that?  (Put your hand down, nerd.  I&#8217;m talking to the normals.)</p>
</p>
<p>Sometimes, you just want to lay down a set of points, and let the browser draw a smooth curve (unlike polylines, where each segment is just a straight line between the points).  Like this:</p>
<p>  <object type="image/svg+xml" width="420" height="120" data="http://schepers.cc/svg/path/pathpoints.svg">Please use a modern browser.</object><br />
<span id="more-243"></span>
</p>
<p> Mouse over the line above to see the equivalent cubic Bézier points.  They are off the line. Off the line! Oh, Math, why do you do this to me?</p>
<p>One thing that&#8217;s always bothered me about SVG&#8230; there should be more simple ways of doing things, and this is one of things.  Over the years, I&#8217;ve idly asked math-minded folks about how to achieve this, and the answers always soared right over my pointy little head.  I probably didn&#8217;t ask the question the right way.</p>
</p>
<p>But a few months ago, I was chatting with Ben Fry, one of the creators of Processing (the graphics programming language), and he mentioned <a href="http://en.wikipedia.org/wiki/Catmull%E2%80%93Rom_spline#Catmull.E2.80.93Rom_spline" title="Cubic Hermite spline - Wikipedia, the free encyclopedia">Catmull-Rom curves</a> as a possible solution.  I took note of that, and later read up on them; they seemed a pretty good fit for my use case.  In my spare time I looked for any libraries out there to convert Catmull-Rom curves to Bézier splines; I found <a href="http://almightybuserror.com/2009/12/04/drawing-splines-in-opengl.html">references</a> that talked about the the conversion using inverted matrixes, but no simple code to be had.  I&#8217;m lazy, and busy, and the problem wasn&#8217;t urgent, so I kept putting it off.</p>
</p>
<p>But in talking to folks about SVG throughout the UK, including designers, the thought kept running through my mind that SVG really does need a better authoring experience (and I don&#8217;t just mean authoring tools, though some nice animation tools would help).  So, when I got back home from vacation, before I really got back into the thick of the dozen other things I should be doing, I put on some music and spent a few hours after work scouring the intartubes for some suitable code.  And as luck would have it, Maxim Shemanarev&#8217;s <a href="http://www.antigrain.com/__code/include/agg_curves.h.html">Anti-Grain Geometry</a> library contained a single simplified conversion matrix and a line of code that did the grunt work in C++, easily ported to Javascript; whip up a custom parser for the &lt;path&gt; syntax, feed it into the convertor function, and you&#8217;ve got yourself a working proof-of-concept.</p>
</p>
<p>Here is a scientific chart showing how awesome the SVG &lt;path&gt; element is, with values derived from the overall awesomeness by different path commands, rendered using an experimental Catmull-Rom path command:</p>
<p><object type="image/svg+xml" width="450" height="400" data="http://schepers.cc/svg/path/path-awesomeness.svg">Please use a modern browser.</object></p>
<p>As you can see, adding Catmull-Rom curves would increase the awesomeness of SVG paths by almost 50%.  That is a lot more awesome!</p>
</p>
<p>The syntax is pretty intuitive&#8230; it&#8217;s just the command &#8216;R&#8217; followed by a set of coordinate points:</p>
<pre><code>
  &lt;path stroke="#BADA55"
        stroke-width="2"
        fill="none"
        d="M20,380
           R58,342
           100,342
           100,300
           140,250
           190,210
           220,197
           250,184
           280,155
           310,260
           404,20"/&gt;
</code></pre>
<p>And the path syntax isn&#8217;t just used for the &#8216;d&#8217; attribute of &lt;path&gt; elements.  It&#8217;s also used for laying out text-paths, and the shapes of SVG Font glyphs.  And it&#8217;s used in animation, both for motion paths and (in the case of Béziers) for timing functions in the &#8216;keysplines&#8217; easing attribute that controls the rate of animation.  So, making it easier to hit specific points for paths could have side benefits for all those uses as well.</p>
</p>
<p>I&#8217;m really interested in feedback from others on the usefulness of this idea.  I&#8217;m not married to the idea of Catmull-Rom curves specifically (<i>Fun fact: Ed Catmull is now the president of the Walt Disney and Pixar animation studios; I believe Rom became an astronaut, was captured by aliens and turned into a cyborg, and is now a Spaceknight</i>), just in the idea of adding this type of point-on-the-path command.  So, if you support the notion of adding this in SVG 2, or have a better idea along the same lines, send an email to the SVG Working Group&#8217;s public list, <a href="mailto:www-svg@w3.org">www-svg@w3.org</a>, to let us know.</p>
<p>The <a href="http://schepers.cc/svg/path/catmullrom2bezier.js">javascript library</a> I wrote to demonstrate this is, of course, open source, available under the MIT or GPL licenses.  Feel free to play around with it, and improve it to make a better proposal.  You&#8217;re welcome to use it for other purposes, but I intended it just as a quick-and-dirty prototype to solicit feedback about extending SVG, so the code isn&#8217;t that great.</p>
<hr />
<h4 id="normals">Update 1:</h4>
<p><a href="http://xn--dahlstrm-t4a.net/">Erik Dahlström</a>, Chief Vectorizer at Opera and chair of the SVG WG, posted a <a href="http://schepers.cc/?p=243#comment-166">visual reply</a>, which WordPress filtered, but I&#8217;ve now <a href="http://schepers.cc/?p=243#comment-166">restored this inline</a>.  Nothing to see here, move along.</p>
<hr />
<h4 id="spiro">Update 2:</h4>
<p>Here is my Catmull-Rom code trying to achieve the nice curves of <a href="http://www.levien.com/spiro/">Spiro</a>, as suggested by Dave Crossland in <a href="http://schepers.cc/?p=243#comment-170">his comment</a>:<br />
<object type="image/svg+xml" width="485" height="277" data="http://schepers.cc/svg/path/spiro.svg">Please use a modern browser.</object></p>
<hr />
<h4 id="spiro-a">Update 3:</h4>
<p>Looking at Spiro curves a bit closer (just the image, not the code), it seems that there are actually different node types illustrated, not simply an undifferentiated set of coordinate points as in my interpretation of the Catmull-Rom algorithm.  This means that, from an syntax standpoint, those segments would need additional parameters in addition to the coordinate points on the curve, which somewhat undercuts the simplicity.</p>
<p>Given that SVG already has a &#8216;Lineto&#8217; command, I set out to see how closely I could match <a href="http://www.levien.com/spiro/spiro.png">the letter &#8220;a&#8221; in Raph Levien&#8217;s example</a>, using just my Catmull-Rom and Lineto segments, and with minimal effort:</p>
<p><object type="image/svg+xml" width="485" height="465" data="http://schepers.cc/svg/path/spiro-a.svg">Please use a modern browser.</object></p>
<p>Mouse over the raster image to hide the SVG path.  There are definite artifacts, and I am running into some known limitations of my script implementation in how it interpolates the last coordinate segment, but with not much effort, I was able to get pretty close.</p>
<p>This is not to belittle Spiro at all&#8230; Spiro generates <a href="http://fontly.com/sandbox/spiro.html">painfully elegant curves</a>.  It&#8217;s just to compare apples to apples.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/getting-to-the-point/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Formata Non Grata</title>
		<link>http://schepers.cc/formata-non-grata</link>
		<comments>http://schepers.cc/formata-non-grata#comments</comments>
		<pubDate>Sat, 10 Jul 2010 15:39:19 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=160</guid>
		<description><![CDATA[<br/>Recently, a browser implementer asked me for examples of SVG. He was having trouble finding good examples of SVG in use, particularly as parts of an HTML document. This question has come up again and again, actually, and it always vexes me. I&#8217;ve been active in the SVG community for close to a decade, and [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Recently, a browser implementer asked me for examples of SVG.  He was having trouble finding good examples of SVG in use, particularly as parts of an HTML document.  This question has come up again and again, actually, and it always vexes me.  I&#8217;ve been active in the SVG community for close to a decade, and I&#8217;ve seen thousands of amazing SVG files (and many more of mediocre to average quality), but somehow they seem to have disappeared or bitrotted over the years.  Some of those files only worked with the slightly-unstandard Adobe SVG Viewer, or didn&#8217;t quite work with Firefox&#8217;s incomplete support, I know, but surely not all of them.  Where is all the great SVG content I remember, the games and GUIs and design and development?  Where are all those files to be found?</p>
<p>I hear some browser implementers say that people just don&#8217;t use SVG.  Intuitively, this feels false to me, based on my own experience.  But could it be true?</p>
<p><span id="more-160"></span></p>
<p>The statistical insignificance of SVG is often cited by some people in the WHATWG, based on a large dataset of Web content indexed by Google.  In the WHATWG, where HTML5 started, great stock is placed on statistics, particularly <a href="http://code.google.com/webstats/index.html">those conducted</a> by the editor, Ian Hickson, a Google employee.</p>
<p style="text-align: center;"><a title="Based on a study of one BILLION documents!" href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-June/006726.html"><img class="aligncenter size-full wp-image-167" title="DrHTML5" src="http://schepers.cc/wp-content/uploads/2009/07/DrHTML5.png" alt="DrHTML5" /></a></p>
<p>There&#8217;s no question about it: HTML is the king of the Web.  I did some rough calculations, similar to claims I&#8217;ve heard before, by counting the number of returns for HTML files versus SVG files.  A <a title="SVG filetype search on Google" href="http://www.google.com/search?q=filetype%3Asvg">search for the filetype &#8220;.svg&#8221;</a> yields around 18,165,500 hits on Google.  (Note that this doesn&#8217;t count the false hits on the word &#8220;SVG&#8221; from St. Vincent and the Grenadines, Stan Van Gundy, the Sexy Valley Girls, or any of the numerous other bizarrities that the acronym stands for.)  SVG content makes up just 0.106% of all Web content, by my rough estimation.  Flash is almost 5 times as common as SVG.  That&#8217;s pretty grim for SVG.</p>
<p>But wait, let&#8217;s put that into perspective.  Flash is about 4.8 times more common than SVG.  HTML is roughly 838 times more common than SVG.  838 times.  Flash content comprises approximately 0.52% of all Web content, and HTML is roughly 189 times more common than  Flash.  So, Flash is clearly much more popular than SVG (even when you consider that some large percentage of Flash content is actually just encapsulated video content, these days).  But that doesn&#8217;t mean that nobody&#8217;s using SVG.  Nearly 20 million documents is pretty impressive, actually, especially given the fact that SVG has been hindered by a lack of native support in browsers for most of its existence (and more recently, even poor support by the Adobe plugin for IE), and a lack of common authoring tools for dynamic content (Inkscape is an excellent vector editor, but it doesn&#8217;t yet do animation or interactivity).</p>
<p>Eighteen million documents.  That&#8217;s a lot of files.  So, given that, why  is it so hard to find SVG content?</p>
<p>Maybe because the most popular search engine in the world, Google, doesn&#8217;t index SVG.</p>
<h3>Indexing SVG</h3>
<p>A long time ago, back in 2002, I made a <a title="Discussion of SVG text search and translation" href="http://schepers.cc/svgaccessibility.html">page</a> discussing my experiments with text search and translation.  The results were not very encouraging, but I reckoned it was just a matter of time.  I optimistically wrote to Google to encourage them to enable text search and translation of SVG files.</p>
<p>8 years down the line, things don&#8217;t seem to have changed much on that front.</p>
<p>To be fair, many SVG files don&#8217;t contain any text at all, not even a &lt;title&gt; element, so indexing them might not yield much.  But many other files do have at least a title, and SVG infographics and webapps usually have at least labels that might be meaningful as search terms.  Often SVG files are even text-heavy.</p>
<p>It&#8217;s not that Google doesn&#8217;t take note of the files&#8230; obviously, you can search for the filetype, or in the worst case, the specific file URL, and normally get back positive results.  But Google doesn&#8217;t seem to search the contents of the SVG files and present them in the relevant result set.  To test this, I tried searching for a few files that I knew to have indexable text content.</p>
<p>As an example, I looked for some SVG files on my little (long out-of-date) SVG promotion site, SVG-Whiz.com.  First, I searched for a file I knew to have a cogent block of text, my explanation of the distinctions between &#8216;display&#8217;, &#8216;visibility&#8217;, and &#8216;opacity&#8217;, called <a href="http://svg-whiz.com/svg/HideShow.svg">HideShow.svg</a>:  </p>
<p><object type="image/svg+xml" width="360" height="400" data="http://svg-whiz.com/svg/HideShow.svg">Please use a modern browser.</object></p>
<p>This file has been hosted on my site since 2003, I&#8217;ve gotten several positive comments about it, and a <a href="http://www.google.com/search?q=http%3A%2F%2Fsvg-whiz.com%2Fsvg%2FHideShow.svg">direct search for that file URL</a> turns up a few hits linking to it, so it&#8217;s seems like a reasonable candidate for indexing.  But what are the results of my in-site <a href="http://www.google.com/search?q=site%3Asvg-whiz.com%20opacity">Google search for the word &#8216;opacity&#8217;</a>?  Okay, that just turned up the explanation page linking to the SVG file in question.  Fair enough, maybe Google doesn&#8217;t treat SVG as a &#8220;document&#8221; file, only as an image.  So, how about an <a href="http://www.google.com/images?q=site%3Asvg-whiz.com%20opacity">image search for the same term</a>?  Nada.  So, maybe Google doesn&#8217;t consider SVG to be either a &#8220;document&#8221; nor an &#8220;image&#8221;&#8230; let&#8217;s <a href="http://www.google.com/search?q=site%3Asvg-whiz.com+opacity+filetype%3Asvg">search for the word &#8216;opacity&#8217; in the site &#8216;svg-whiz.com&#8217; with the filetype &#8216;svg&#8217;</a>.  As specific as that is, at the time of writing, I got not a single resulting hit.</p>
<p>Google can find the files&#8230; why doesn&#8217;t it do something with them?</p>
<h3>Comparison of File Extension Frequency</h3>
<p>So, what criteria does Google use to decide which file types it is going to index?</p>
<p>The <a title="Google's Filetype FAQ" href="http://www.google.com/help/faq_filetypes.html">Google FAQ on search filetypes</a> lists 23 file extensions that it indexes, and says:</p>
<blockquote><p><span style="line-height: 28.5px;">There are 13 main file types searched by Google in              addition to standard web formatted documents in HTML. The most common              formats are PDF, PostScript, Microsoft Office formats [...] </span><span style="line-height: 28.5px;">Google is also scouring the Web for additional file            types that are very rare. You may see them pop up in your results from            time to time.</span><span style="line-height: 28.5px;"> [...] </span><span style="line-height: 28.5px;">PDF formatted files are the most popular after HTML files.            PostScript and Microsoft Word files are also fairly common. The other            file types are relatively uncommon by comparison. </span></p></blockquote>
<p>So, I took the liberty of conducting my own survey of the relative frequency of various filetypes, as collected by Google itself, by using the <span style="line-height: 28.5px;">&#8220;filetype:extension&#8221;</span> query term. I&#8217;m not totally convinced this is at all an accurate means to collect and analyze the data, but it&#8217;s what I had at hand.</p>
<p>I put together a table that compares the different file types that Google explicitly mentions.  (I thought about representing the data as an SVG barchart, but I was afraid it wouldn&#8217;t be indexed&#8230; just kidding, the sheer volume of HTML files would make every other bar just a blip.)</p>
<p>I also threw in some other filetypes of interest, including some with functional similarity to SVG, such as Illustrator, PhotoShop, and Silverlight.  I expected non-Web filetypes such as Illustrator&#8217;s &#8220;*.ai&#8221; to be disproportionately underrepresentated in the results compared to their actual usage, and that was indeed borne out; it&#8217;s hard to know what percentage of SVG files are intended for and presented on the Web (I&#8217;ve spoken to many Inkscape users who only use SVG for print or local hard-drive, which surprised me), but I would guess that it is far, far more heavily tilted toward Web usage&#8230; but I still thought it would be interesting to compare.</p>
<p>What did surprise me was how &#8220;*.svg&#8221; compared to such ubiquitous file extensions as &#8220;*.txt&#8221;, and those for Excel, PowerPoint, and the venerable PostScript.  To be frank, the results make me question my methodology, or perhaps the accuracy of Google&#8217;s reporting.</p>
<table style="text-align:right; background-color:#A2953A; border:none; border-collapse:collapse; border-spacing:0px;" border="0" cellpadding="2px">
<tbody>
<tr style="background-color:#414602; color:#FFFFE3; border-collapse:separate;">
<th style="text-align:center;">File Type</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">File Extension</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">Number of Results</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">Introduction</th>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="5">HyperText Markup Language</th>
<td style="color:#7A7822;">total</td>
<td><strong>16,574,700,000</strong></td>
<td>1991</td>
</tr>
<tr>
<td>html</td>
<td>8,180,000,000</td>
<td></td>
</tr>
<tr>
<td>php</td>
<td>7,010,000,000</td>
<td></td>
</tr>
<tr>
<td>asp</td>
<td>1,370,000,000</td>
<td></td>
</tr>
<tr>
<td>xhtml</td>
<td>14,700,000</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe Portable Document Format</th>
<td>pdf</td>
<td><strong>281,000,000</strong></td>
<td>1993</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Shockwave Flash</th>
<td style="color:#7A7822;">total</td>
<td><strong>87,923,300</strong></td>
<td>1996</td>
</tr>
<tr>
<td>swf</td>
<td>87,900,000</td>
<td></td>
</tr>
<tr>
<td>fla</td>
<td>23,300</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Word</th>
<td>doc</td>
<td><strong>58,500,000</strong></td>
<td>1983</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Text</th>
<td style="color:#7A7822;">total</td>
<td><strong>32,757,000</strong></td>
<td>1982</td>
</tr>
<tr>
<td>txt</td>
<td>32,600,000</td>
<td></td>
</tr>
<tr>
<td>ans</td>
<td>157,000</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Scalable Vector Graphics</th>
<td style="color:#7A7822;">total</td>
<td><strong>18,165,500</strong></td>
<td>1999</td>
</tr>
<tr>
<td>svg</td>
<td>18,100,000</td>
<td></td>
</tr>
<tr>
<td>svgz</td>
<td>65,500</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Excel</th>
<td>xls</td>
<td><strong>12,500,000</strong></td>
<td>1982</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft PowerPoint</th>
<td>ppt</td>
<td><strong>7,790,000</strong></td>
<td>1984</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Rich Text Format</th>
<td>rtf</td>
<td><strong>5,130,000</strong></td>
<td>1987</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe PostScript</th>
<td>ps</td>
<td><strong>2,440,000</strong></td>
<td>1982</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe Illustrator</th>
<td>ai</td>
<td><strong>135,000</strong></td>
<td>1986</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">OpenOffice.org</th>
<td>odt</td>
<td><strong>135,000</strong></td>
<td>1999</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">MacWrite</th>
<td>mw</td>
<td><strong>35,600</strong></td>
<td>1984</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe PhotoShop</th>
<td>psd</td>
<td><strong>21,800</strong></td>
<td>1988</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Silverlight</th>
<td style="color:#7A7822;">total</td>
<td><strong>8,493</strong></td>
<td>2003</td>
</tr>
<tr>
<td>xaml</td>
<td>8,180</td>
<td></td>
</tr>
<tr>
<td>xap</td>
<td>313</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">CorelDRAW</th>
<td>cdr</td>
<td><strong>8,310</strong></td>
<td>1989</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="4">Microsoft Works</th>
<td style="color:#7A7822;">total</td>
<td><strong>2,266</strong></td>
<td>1987</td>
</tr>
<tr>
<td>wks</td>
<td>1,190</td>
<td></td>
</tr>
<tr>
<td>wps</td>
<td>801</td>
<td></td>
</tr>
<tr>
<td>wdb</td>
<td>275</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="9">Lotus 1-2-3</th>
<td style="color:#7A7822;">total</td>
<td><strong>1,981</strong></td>
<td>1983</td>
</tr>
<tr>
<td>wks</td>
<td>1,190</td>
<td></td>
</tr>
<tr>
<td>wk1</td>
<td>571</td>
<td></td>
</tr>
<tr>
<td>wki</td>
<td>89</td>
<td></td>
</tr>
<tr>
<td>wk3</td>
<td>47</td>
<td></td>
</tr>
<tr>
<td>wk4</td>
<td>41</td>
<td></td>
</tr>
<tr>
<td>wku</td>
<td>33</td>
<td></td>
</tr>
<tr>
<td>wk5</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>wk2</td>
<td>4</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Write</th>
<td>wri</td>
<td><strong>1,200</strong></td>
<td>1985</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Lotus WordPro</th>
<td>lwp</td>
<td><strong>148</strong></td>
<td>1995</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">All Web Content</th>
<td></td>
<td><strong>17,081,255,598</strong></td>
<td>1989</td>
</tr>
</tbody>
</table>
<p><strong>Caveat:</strong> I originally compiled this information a few months ago, and when rechecking it for accuracy, I got a surprising result.  Normally, the <a title="Google search for SVG files" href="http://www.google.com/search?q=filetype:svg">Google search for filetype:svg</a> returned 18,100,000 hits, but late one night, it returned only 2,000,000 hits; now, my most recent check showed around 4,300,000 hits.  Jumping around in the results for an explanation, I noticed that there is a lot of duplication of Wikipedia content, and since Wikipedia uses SVG, that might account for some discrepancy.  One possibility is that  the lower figure represents 2 million unique documents, which are duplicated in a lot of places; the same should be said of any HTML content, and probably to a lesser extent of Flash content.  I don&#8217;t know if this is the right conclusion, but it would be an interesting data point.  Even with the much more modest figure of 2 million documents, I still think that represents an impressive body of work, particularly in light of the fact that SVG documents are normally authored individually, not through forum or blog software, or exporting or reformatting of email and text content as HTML.</p>
<h3>Conclusions</h3>
<p>I don&#8217;t think this is some grand conspiracy by Google to suppress SVG.  Simple neglect is much more plausible.  They don&#8217;t seem to see the value in indexing SVG.  But the end result is the same: SVG seems to be statistically underrepresented in terms of access through Google searches, and thus, it is harder to find SVG content. </p>
<p>Relying on the results of a search engine that doesn&#8217;t index SVG, to draw conclusions about how many people are using SVG is not statistically sound.   This is a bit like conducting a phone survey of English speakers in China, and concluding that nobody speaks with a Southern US accent.  I reckon y&#8217;all might could see the problem with that methodology if you lived here in North Carolina.</p>
<p>SVG is at least as plentiful on the Web, by Google&#8217;s own reckoning, as most other file types that Google does index. Search engines, Google included, should index SVG files. They should read the text inside the file, and if the file is referenced in an HTML page, they should associate those keywords with the SVG file, just as they do with raster images. SVG files should display in image searches, as well. Here&#8217;s a list of the kind of useful content that can be gleaned from most SVGs:</p>
<ul>
<li><strong>file name: </strong>while pretty primative, many files give some clue as to their contents in their name</li>
<li><strong>text elements</strong><strong>: </strong>there are several elements in SVG that contain text to be rendered to the screen, including &lt;text&gt;, &lt;tspan&gt;, &lt;textPath&gt;, and &lt;textArea&gt;, and the content should be indexed as if it were text in any other format</li>
<li><strong>embedded HTML: </strong>HTML (and other markup) can be embedded inline in SVG, and search engines should look for that and index it as they would standalone HTML content</li>
<li><strong>links: </strong>Google, and probably most other modern search engines, give weight to files that are linked from other files, and files referenced from SVG content should benefit in the same way; the @xlink:title and @rel can help define the relationship between the files</li>
<li><strong>descriptive elements: </strong>like HTML, SVG has a &lt;title&gt; element that doesn&#8217;t display, but adds to the information about its parent file or element, and SVG also has a &lt;desc&gt; element for a longer description</li>
<li><strong>metadata: </strong>SVG can contain RDF, RDFa, microformats, and ARIA markup, which search engines are starting to pick up on these days; these metadata can reveala lot about a file, from its license information to structured content (like calendars or dates or contact info) to intent (such as ARIA roles, which will soon be expanded to include things like different chart types)</li>
</ul>
<p>And the SVG Working Group would be happy to work with any search engine developers to make improvements to SVG 2 to help make indexing SVG content easier or more fruitful.</p>
<p>I&#8217;m not trying to pick on Google here (though I do note that a <a href="http://www.bing.com/search?q=svg+opacity+svg-whiz.com">Bing search for &#8216;svg opacity svg-whiz.com&#8217;</a> listed the SVG file as the first hit), I&#8217;m just noting a discrepancy and an opportunity for improving the experience that people have on the Web with regards to SVG.  At the very least, SVG should be recognized by Google as a legitimate file type, rather than a formata non grata.</p>
<h4>Update</h4>
<p>Rob Russell delivered great news to us in his SVG Open keynote.  As of August 31, 2010, <a href="http://googlewebmastercentral.blogspot.com/2010/08/google-now-indexes-svg.html?utm_source=feedburner&#038;utm_medium=twitter&#038;utm_campaign=Feed%3A+blogspot%2FamDG+%28Official+Google+Webmaster+Central+Blog%29">Google now indexes SVG</a> and delivers it in some search results.   Kudos to Google for stepping up!  I&#8217;m very pleased&#8230; solid results only 6 weeks later.  (I guess I should thank Slashdot, too.)</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/formata-non-grata/feed</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Web Audio Goes to Eleven</title>
		<link>http://schepers.cc/web-audio-goes-to-eleven</link>
		<comments>http://schepers.cc/web-audio-goes-to-eleven#comments</comments>
		<pubDate>Fri, 14 May 2010 18:58:42 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=212</guid>
		<description><![CDATA[<br/>I&#8217;m really excited about W3C&#8217;s new public Audio Incubator Group, just launched today, and open for collaborators, innovators, and instigators. Go take a look for yourself, and see if you can contribute. To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m really excited about W3C&#8217;s new public <a href="http://www.w3.org/2005/Incubator/audio/">Audio Incubator Group</a>, just launched today, and open for collaborators, innovators, and instigators.  Go take a look for yourself, and see if you can contribute.</p>
<p>To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG (you&#8217;ll need a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special Minefield build</a> to use it).  Just click on the keyboard&#8230; it&#8217;s pretty rough still, but it shows some of the potential:</p>
<p><iframe src="http://schepers.cc/svg/keyboard.svg" class="aligncenter" scrolling="no" frameborder="0" width="478" height="190">Please use FF1.5+, Opera 9+, WebKit/Safari3.0+, or IE9+</iframe><br />
<em>(<a href="http://schepers.cc/svg/keyboard.svg">standalone SVG file</a>)</em></p>
<p>For some background, read on after this break&#8230;<br />
<span id="more-212"></span></p>
<h3>Background</h3>
<p>Years ago, I was one of several SVG developers interested in doing for audio what SVG did for graphics, and we <a href="http://tech.groups.yahoo.com/group/svg-developers/message/28154">talked</a> a bit about a format we called  <a href="http://uk.groups.yahoo.com/group/SynthML/">SynthML</a>.  The old Adobe SVG viewer included an audio element for MP3 playback, and I found it really useful for adding subtle sounds for button mouseovers, clicks, and other UI effects, so the idea of programmatic control of music on the Web had intrigued me for some time (anyone remember Thomas Dolby&#8217;s Beatnik?), for enhancing user interfaces, adding ambient background music, and providing full fledged music webapps. The SynthML effort fizzled out, and while there are some interesting music markup languages (most notably <a href="http://www.musicxml.org/xml.html">MusicXML</a>, which is more like the MathML of music), there hasn&#8217;t been much traction beyond simple recording playback.</p>
<p>That&#8217;s why I was so psyched when I saw what <a href="http://alistairgmacdonald.com/">Alistair MacDonald</a>, <a href="http://vocamus.net/dave/?cat=25">David Humphrey</a>, <a href="http://twitter.com/corban">Corban Brook</a>, and a few others were up to while attending a  Processing.js community event at <a href="http://loft.bocoup.com/">Bocoup</a>.  David hacked up a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special build</a> of Gecko to add script access to the raw audio stream of the HTML5 &lt;audio&gt; element, and Al, Corban, and friends were building <a href="http://weblog.bocoup.com/web-audio-all-aboard">cool demos</a> on top of it.</p>
<p>I immediately knew I wanted to see this as a part of the native functionality of the Web platform, across browsers.  In some ways, it&#8217;s the last major missing piece from the open Web&#8230; the ability to view source and hack sound, the last commonly digitizable sensorium. I also knew that I wanted the use cases and requirements to come from the larger community, the musicians and UI designers and developers who will ultimately be the ones using this functionality to sound out the depths of what&#8217;s possible on the Web (okay, I&#8217;m corny).  So, I talked with Corban, David, and Al, and we agreed that a public discussion forum would be the best way to connect with this community, to get them talking and experimenting and building and sharing.</p>
<p>Chris Blizzard of Mozilla was there too, co-sponsoring the event, and he was extremely supportive of getting this work started at W3C.  I wrote up a <a href="http://www.w3.org/2010/04/audio/audio-incubator-charter.html">charter</a> for a public incubator group, and started knocking on doors of the browser vendors, our other members, and the wider community who might be stakeholders, to drum up interest.  Pretty quickly, I got support from folks at the University of Rio (PUC-Rio), BBC, and Google; currently, a W3C Incubator Group takes a minimum of three W3C members to kick it off, though once it&#8217;s started, anyone can join.  With that nicety taken care of, W3C management approved the charter, and the new W3C Audio Incubator Group (or Audio XG) was launched today!</p>
<h3>Joining the Audio XG</h3>
<p>I invite anyone interested in audio, music, speech synthesis, games, or other related topics to get involved, <a href="http://www.w3.org/2005/Incubator/audio/wiki/Join_the_Audio_Incubator">join the Audio XG</a>, and start shaping the future of Web audio on the mailing list, and chat on the <a href="irc://irc.w3.org:6665#audio">#audio</a> IRC channel (irc.w3.org, port 6665, channel #audio).  Incubator participation is free and open to anyone who wants to help out.</p>
<h3>About the SVG Synth</h3>
<p>My SVG synthesizer is a true product of the Web.  I know next to nothing about music&#8230; I can&#8217;t play an instrument, can&#8217;t read music, don&#8217;t know music theory&#8230; I love music, but I&#8217;m a consumer, not a creator.  I&#8217;d love to change that, when I have time, but I&#8217;ll settle for now for enabling others.</p>
<p>So, when I decided to make something with the audio API, naturally my first thought was to do something I didn&#8217;t know how to do, for which I&#8217;m totally unqualified: create a synthesizer in SVG.</p>
<p>I started with the HTML example from the documentation for the <a href="https://wiki.mozilla.org/Audio_Data_API">experimental audio API</a> on the Mozilla wiki, and converted it to SVG (with a few missteps along the way).  As it turns out, the HTML5 audio interface is exposed in Gecko (the Firefox engine) even when there is no HTML content.  This was good news for me.  It made it even easier to programmatically create sound with it.  I suspect that this is something that lies outside any current specification, but it should be codified somewhere.</p>
<p>Next, I looked for a piano keyboard in SVG; I found a few on <a href="http://upload.wikimedia.org/wikipedia/commons/c/c0/Klaviatur-3-en.svg">Wikimedia Commons</a>, but they were not quite what I wanted (and in typical Inkscape fashion, were a little bloated), so ultimately I just made my own, which was trivial to do.</p>
<p>Next, I had to understand which notes each key should sound.  So I read a <a href="http://www.musictheory.halifax.ns.ca/3keyboard.html">lesson on keyboard basics</a>, which sufficed for my purpose.</p>
<p>Then I had to figure out what the frequency of each note is in Hertz (Hz), which is what the audio API understands.  It was no surprise that someone had published just such a <a href="http://www.phy.mtu.edu/~suits/notefreqs.html">table corresponding notes to frequency</a>, with the companion <a href="http://www.phy.mtu.edu/~suits/NoteFreqCalcs.html">equations for deriving them</a>.  </p>
<p>To put the pieces together, I took the simplest possible approach: I handcoded the keyboard (I could have instantiated it with script, because it&#8217;s very deterministic, but I favor declarative markup that can be tweaked in an authoring tool); I assigned an id to each key based on the note (C4, Af0-Bb0, etc., where &#8220;f&#8221;==&#8221;flat&#8221; and &#8220;b&#8221;==&#8221;sharp&#8221;, and the number denotes the octave); I then created an associative array with the note-id as the index and the frequency as the value, so I could look it up with the key&#8217;s id; then it was just a matter of sending the frequency to the script from the HTML example, and adding a duration timer.</p>
<p>Finally, just as a decorative flourish, I found a partial musical staff with a treble clef and beamed eighth-note, <a href="http://upload.wikimedia.org/wikipedia/commons/a/ac/Musical_notes.svg">in SVG, of course</a>, and tweaked it to my liking.</p>
<p>My tools? A Web browser with the audio API enabled (libre source), a search engine, and a text editor.</p>
<p>Voilà!  From knowing almost nothing about formal music (I&#8217;d never even heard the term &#8220;middle C&#8221; before), I created a simple synthesizer, and learned a bit about music along the way.  That&#8217;s the power of the open Web.  That&#8217;s why I&#8217;m so pumped up about this new focus on audio.  This one goes to 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/web-audio-goes-to-eleven/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stumbling Towards a Graphical Workflow</title>
		<link>http://schepers.cc/stumbling-towards-a-graphical-workflow</link>
		<comments>http://schepers.cc/stumbling-towards-a-graphical-workflow#comments</comments>
		<pubDate>Mon, 08 Mar 2010 10:10:34 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Authoring Tools]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG Basics]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=190</guid>
		<description><![CDATA[<br/>I&#8217;m working with a professional designer, Michael, on some graphics for my upcoming MIX presentation.  I&#8217;ve worked with designers before on various projects, some SVG, some traditional Web design, but this is my first time working on an SVG project with someone who never used SVG before, and it&#8217;s been an interesting experience, which I [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m working with a professional designer, Michael, on some graphics for my upcoming <a title="SVG session at Microsoft MIX conference" href="http://live.visitmix.com/MIX10/Sessions/EX30">MIX presentation</a>.  I&#8217;ve worked with designers before on various projects, some SVG, some traditional Web design, but this is my first time working on an SVG project with someone who never used SVG before, and it&#8217;s been an interesting experience, which I thought I&#8217;d jot down for anyone interested.</p>
<p>Both of us have been busy with other projects, and since we are in different places (me in Chapel Hill NC, him in Atlanta GA), we have only gotten to touch base a few times.  Michael has delivered some first drafts of the graphics, which look lovely, and I decided to dig into the underlying code, confident that I could trim down the file size and thus help browser performance.</p>
<p>My personal graphical editor of choice is Inkscape, which is a fine tool for all its warts (though it&#8217;s a little painful on Mac, where it is hosted as an X-11 application); typically, though, I create SVG either programmatically with a script or manually with a text editor (yes, I know that&#8217;s crazy&#8230; but it <a title="A sad example of hand-coded SVG art" href="http://svg-whiz.com/svg/shinydonkey/shinyDonkey.svg">can be done</a>).  Michael, being a professional designer, uses Adobe Illustrator, and I am keen to have him use the tools he is most comfortable with.  Since I want SVG to be used by mainstream designers, I want to understand how their tools work and what their workflow is like.</p>
<p>So, in order to make sure that we can roundtrip the files as seamlessly as possible, while still leveraging the features of SVG, I set about today to establish a workflow with Illustrator, TextMate (my go-to text editor, with a custom SVG code template bundle), Firefox, and its native debugger extension Firebug (with its handy &#8220;Inspect Element&#8221; context-menu selection).  My goal: to make reusable icons out of some of the graphical assets in the larger image, to be referenced by SVG&#8217;s &lt;use&gt; element.<span id="more-190"></span></p>
<h3>The &lt;use&gt; Element</h3>
<p>Some earlier graphical languages, especially special-use ones such as CAD languages for engineering, architecture, or mapping, included a native symbol library.  These would normally include a variety of arrowheads, iconic symbols, line styles (dotted, dashed, etc.), and other graphical primitives.  The problem with this idea is that such symbol libraries were by necessity limited in the number of symbols, and usually only had one or two styles for each basic symbol. Not very extensible.  SVG took a different approach.</p>
<p>SVG has the ability to &#8220;clone&#8221; an image, to reposition or resize it, and to change some of its styling.  This works on a shape or collection of shapes, whether the image is defined in the same document, or in an external SVG file.  The mechanism to do this is the &lt;use&gt; element, and it looks like this:</p>
<blockquote>
<pre>&lt;use xlink:href="#myImageId"
     x="100" y="300"
     transform="scale(1.5)"
     fill="cornflowerblue"/&gt;</pre>
</blockquote>
<p>Translated into English, this code says,</p>
<blockquote><p>Find the image with the <em>id</em> of &#8220;myImageId&#8221;, and copy it.  Move it 100 pixels to the right, and 300 pixels down.  Increase its size by half again.  Oh, and if it doesn&#8217;t already have a color, make it blue. Thanks.</p></blockquote>
<p>(That final &#8220;/&#8221; is the part that says &#8220;thanks&#8221;, a quaint courtesy missing from HTML5.  SVG was specified in a gentler time.)</p>
<p>Thus, designers can provide their own symbols, in the style appropriate to the task at hand.  There are several good SVG clipart libraries that allow SVG authors to share their symbols and simple reusable images.</p>
<p>You can see that if you draw an image of a balloon, with several paths (the bubble, the knot, the string, and maybe a highlighting accent) and some special graphical effects (a gradient, and perhaps a filter effect) all amounting to a dozen lines of code, and you want to reuse this balloon, you don&#8217;t want to redraw it each time; it would be a waste of effort, and result in a much larger file.  For print, this may not be as much of an issue, but for a Web-based format, it takes longer to download and uses more memory in the browser, resulting in poorer performance.  So, instead of rebuilding a score of balloons, or copying and changing the original image description, you can simply make one basic model, sans color, and reference that multiple times, with a different color and size.  It&#8217;s easier to do, and each extra balloon only increases the size of the file by a small amount, much smaller than adding dozens of duplicates.</p>
<p>To really take advantage of this feature takes a different way of thinking about the design.  A clever designer can even create several image components and recombine  them into composites with even more variation.  Of course, it&#8217;s not always appropriate for every project, but my current project has quite a few duplicate images.</p>
<p>This is a feature supported by every browser with native SVG (though not every one yet allows you to reference images in external documents).  So, it&#8217;s a safe and natural feature for an SVG authoring tool to utilize in its SVG output.</p>
<blockquote><p><strong>Best Practice:</strong> Make liberal use of &lt;use&gt;.</p></blockquote>
<h3>&lt;use&gt; It and Lose It</h3>
<p>Illustrator doesn&#8217;t support &lt;use&gt;.</p>
<p>Or rather, it does recognize it, and render it&#8230; but it promptly converts any instances of the &lt;use&gt; element to simple verbose copies of the referenced image.  I could not find any way to create an instance of &lt;use&gt;.</p>
<p>Also, when creating gradients, Illustrator seems to get overly specific about the position and dimensions (width, height) of the gradient, needlessly yoking them to a specific element at a particular location and of a particular size.  SVG allows you to define a gradient once and reuse it among several shapes, decreasing the number of gradients; Illustrator should make better use of this feature, and so should Inkscape.</p>
<p>This is not a tool created with the Web in mind.</p>
<p>Because of this quirk, my current file size is about 6 or more times what it needs to be.  Let&#8217;s see how we can work around that.</p>
<h3>Symbolic Gestures</h3>
<p>I spent quite a bit of time &#8211;hours, truth to tell, because I&#8217;m an Illustrator newbie&#8211; isolating individual images (trees, benches, etc.) that were used through the graphic as a whole.</p>
<p>When I make &#8220;symbols&#8221; (for lack of a better word), I like to find their positioning anchor &#8211;that is, the point at which they are most usefully positioned&#8211; and set that to the {0,0} point, so there are no unpleasant surprises when placing the symbol.  For most symbols, this is the centerpoint of the symbol; if I have an icon (a badge, a logo), I will position it smack dab at the point in my graphic that it should be applied, relative to other images.  For other symbols, it is one of the extremities, where it will meet up with another shape&#8230; for a tree this would be the bottom of the trunk where it sprouts from the ground, for an arrowhead it would be the base where it it attaches to a line.  I try to pick the most intuitive anchor for each symbol.</p>
<p>When you drag a shape to a new location, as I did for creating anchors, Illustrator converts the path  or attribute values to their new coordinates, rather than simply  applying a transformation.  This is something that Inkscape gets wrong  (at least, last time I checked).  Nested transforms are harder for  developers to work with than simple coordinates.  So, kudos to  Illustrator on this one.</p>
<p>Each symbol is best enclosed within a group&#8230; in SVG, this is a &lt;g&gt; element (SVG also has a &lt;symbol&gt; element, but in practice, I don&#8217;t think it&#8217;s worth much).  Grouping allows the designer to collect all the constituent parts of the image together for greater portability.</p>
<p>When a designer works, if they are anything like me, they tweak a bit here and there, sketching out the rough shape, working on another part of the big picture, then focus on adding details.  A problem arises for a developer who has to subsequently dig into the resulting code&#8230; elements are added to the document in the order they are created, so a bunch of shapes that appear to be one symbol might be scattered throughout the document, and might even be in different layers.</p>
<blockquote><p><strong>Best Practice:</strong> Group early, group often.  Create  graphical objects, and think about graphical / document structure.  Your developer co-workers will thank you.</p></blockquote>
<p>Being the non-designer developer I am, my first instinct was to group the elements in a text editor, and as a clumsy first attempt to find the different elements, I used Firebug to inspect each element to find its id or unique data I could use in a text search in the text editor, but the different parts were too scattered for this to be effective; pretty quickly, I turned to Illustrator myself to do the grouping visually.</p>
<p>The process for converting these graphics into symbols was made much clumsier by the selection mechanism of Illustrator.  When things are grouped in Illustrator, it logically selects all the bits of that grouped image.  The problem is that it also does this with layers, as well as groups; you can &#8220;drill down&#8221; from a layer into an individual group, but when you are first trying to select a set of images that aren&#8217;t already grouped, this can be twiddly and frustrating.  Illustrator also defines far too many nested groups, decreasing their usefulness and creating markup cruft that makes later programming harder. Using the selection marquee (the draggy box), you can more easily select the constituent parts of the image, but be careful of any background elements.</p>
<blockquote><p><strong>Best Practice:</strong> When creating symbols, select the elements you want as part of that symbol, either with the selection marquee or with shift+click.  Right-click on the selection, and choose &#8220;Group&#8221; to group the elements, which should also group any gradients, filters, clipping paths, etc. that the shapes use; in the Layers dialog, you will see the graphics collected under a new group labeled &#8220;&lt;group&gt;&#8221;; double-click this, and give it a meaningful name.  (Note: you might need to right-click again and choose &#8220;Isolate Selected Group&#8221; in order to the collect the gradients and other graphical effects into the group; these are not shown in the Layers dialog, so I wasn&#8217;t sure at what point they are included in the group.)</p></blockquote>
<h3>&#8220;Let Me Tell You What I Think You Mean&#8221;</h3>
<p>As I isolated each image, I deleted extraneous shapes that weren&#8217;t part of any symbol.  I made each symbol into its own file, just to keep them tidy.  Each symbol looked great by itself, but when I finally recomposed all the symbols together, the colors were all wrong!  A little digging revealed the problem&#8230; Illustrator changes the ids of the <em>&#8220;paint servers&#8221;</em> &#8211;referenceable graphical effects like  gradients and filters&#8211; as you delete other shapes.  So, when I recombined the symbols into a single file, some of the gradient ids overlapped and defaulted to the first instance&#8230; which screwed up the colors.  This is a portability and maintenance nightmare.</p>
<p>Illustrator tried to be a little too clever here.  Like the way it unwinds &lt;use&gt; references and discards the &lt;use&gt; element, it doesn&#8217;t play well with a designer-developer roundtripping workflow.  I ran into many such cases where it discarded changes I had edited by hand.  I tried to resize the document dimensions in my text editor, but when I loaded it in Illustrator, made some changes, and saved it again, it scaled down my graphics (which I&#8217;d just explicitly scaled up) and changed the viewport to a much smaller set of dimensions.  Hey, Illustrator, if I wanted it that size, that&#8217;s the size I would have made it!  Finally, I gave up, and set the dimensions I wanted in a new file I created in Illustrator itself, and copy-pasted from one Illustrator window into the new document, which seems to have taken.  I don&#8217;t like programs which introduce inconsistency into a workflow.</p>
<p>What are you smirking about, Inkscape?  You pull the same kind of nonsense!</p>
<h3>Copy-Paste Error</h3>
<p>After all this tweaking, I ended up with more or less what I want to start with: a document with the dimensions I need, with a set of reusable symbols at the right scale.</p>
<p>But when I tested it out by selecting a symbol on the canvas, copying it, and pasting it in its new location, I was disappointed to find that Illustrator copied the parts of the symbol, but not the grouping&#8230; it just added the individual parts of the graphic directly in the target layer.</p>
<p><strong>FAIL! </strong></p>
<p>I messed around a bit more with the interface, and through luck, I stumbled on a different way of selecting the symbol.  By toggling a selection button for the group in the Layers dialog, and copying that (Ctrl/Cmd+C only&#8230; Illustrator doesn&#8217;t provide a right-click menu on items in the Layers dialog list), I could paste the group.</p>
<blockquote><p><strong>Best Practice:</strong> Copy and paste symbols from the Layers dialog to preserve their logical structure.</p></blockquote>
<p>This is a far cry from having a &lt;use&gt; element, but I plan to apply a post-processing step to the final document, replacing duplicates with &lt;use&gt; references.  Luckily, Illustrator didn&#8217;t give the pasted copy a completely random id,  but simply appended an incremented number to the original symbol id, so this should be fairly easy.</p>
<p>My next step is to turn the new document over to Michael, my long-suffering designer, and see if any of this makes sense to him, or if he will come to his senses and throttle me for imposing all this developer madness on him.</p>
<h3>To Be Continued&#8230;</h3>
<p>I recognize that my own inexperience with Illustrator is probably behind some of my missteps (the full extent of which I have shielded from you, dear reader).  On the other hand, a fresh pair of eyes can often spot flaws that could be eliminated where an experienced hand would simply repeat the same mistakes.</p>
<p>This project is far from over, and as I refine my workflow, I&#8217;ll report back what I discover.  Some of what I learn may inform future versions of SVG.  Other parts should be changes to the authoring tools.  Hopefully some of it will help help designers and developers work around issues in creating SVG with the tools they use today.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/stumbling-towards-a-graphical-workflow/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Platform Games</title>
		<link>http://schepers.cc/platform-games</link>
		<comments>http://schepers.cc/platform-games#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:07:12 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=133</guid>
		<description><![CDATA[<br/>I attended Google I/O a couple weeks ago, and had a great time.  They really put the &#8220;hype&#8221; in HyperText Markup Language 5, identifying things like the Geolocation API and some of the WebApps Working Group deliverables as part of &#8220;HTML5&#8243;.  Not quite accurate, but it was a branding exercise, not a technical one.  Notably [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I attended Google I/O a couple weeks ago, and had a great time.  They really put the &#8220;hype&#8221; in HyperText Markup Language 5, identifying things like the Geolocation API and some of the WebApps Working Group deliverables as part of &#8220;HTML5&#8243;.  Not quite accurate, but it was a branding exercise, not a technical one.  Notably absent from the things they rolled into HTML5 during the keynote, though, was SVG&#8230; in fact, they seemed to go out of their way to avoid it.</p>
<p>But it&#8217;s in there.<span id="more-133"></span></p>
<p>Behind the curtains, I talked to several Googlers at the conference committed to SVG.  Brad Neuberg, a whipsmart Google engineer and all-around swell guy, is making a Javascript shim that takes SVG (referenced or inline) and renders it consistently across browsers, including Internet Explorer, using the Flash plugin.  Patrick Chanezon and Ignacio Blanco, also of Google, spoke about <a title="Google Slides on SVG and Canvas at JavaOne" href="http://www.slideshare.net/chanezon/javaone-2009-2d-vector-graphics-in-the-browser-with-canvas-and-svg" target="_blank">SVG and Canvas at JavaOne</a> the week after.</p>
<p>It wasn&#8217;t a certainty that SVG integration would make it into HTML5 (rather than HTML6, etc.).  I&#8217;d been asking for it to be included for a while, but the the editor, Ian Hickson, was resistant to the idea.  At one point, he even <a title="Ian Hickson on Alternate Vector Graphics Formats for HTML" href="http://lists.w3.org/Archives/Public/public-html/2008Mar/0039.html" target="_blank">suggested</a> supporting some other vector graphics language, even a stripped-down custom format (which was likely a testing of the waters&#8230; in a similar vein, rather than simply integrating custom namespaces or RDFa or ITS, he reinvented his own syntax for each instead).  But ultimately, even he knew that wouldn&#8217;t fly for vector graphics.  SVG is already too well supported in browsers, in authoring tools, and as a general format for anything else to make sense.</p>
<p>Because it&#8217;s all about the platform.  And SVG is part of the platform.</p>
<p>Already, inline SVG (that is, SVG mixed into a single document with XHTML) works in all the browsers that support both XHTML and SVG (that is, all but Internet Explorer), and even worked in <a title="Old example of Inline SVG" href="http://www.schepers.cc/inlinesvg.html" target="_blank">plain-text HTML in Internet Explorer</a> with the Adobe plug-in almost a decade ago.  Steven Pemberton <a title="Steven Pemberton on XHTML, via Molly Holzschlag" href="http://www.molly.com/2009/06/02/the-real-why-xhtml-discussion/" target="_blank">points out</a> that that was the true innovation of XHTML, the ability to plug in new syntaxes and new functionality without having to change the core of the language or revisit parsing rules.  It has been argued that XHTML&#8217;s extensibility is superior to HTML5&#8242;s parsing rules that only work with a set vocabulary.</p>
<p>But the browser vendors were determined that text/html, being more common and robust than XHTML, had a market advantage, and so to fit in with that, SVG needed to work not just with XHTML, but also with text/html.  There were compromises along the way with SVG&#8230; probably chief among these are parsing issues.  Unlike XHTML, SVG was designed from the ground up for an XML syntax.  HTML uses a much more complicated parsing that defines error recovery behavior for things like missing quotes around the attribute values, case insensitivity, and non-well-formed markup, and it doesn&#8217;t support namespaces properly.  SVG in text/html has to (some say &#8220;gets to&#8221;) follow some of these rules in order to fit in.  The SVG WG was a bit reluctant to adopt these changes, out of concern that SVG might fly into tag soup, making it harder for existing authoring tools and XML-based SVG viewers, as well as generic XML processing tools.</p>
<p>But ultimately, we had to agree that SVG needs to conform to the platform.</p>
<p>So, we&#8217;ve taken a step backwards in some ways: right now, there&#8217;s pretty much no non-conforming SVG content in the wild, and the Adobe SVG viewer was fast, and had features still not found in some browsers.  But we&#8217;ve now got better error recovery, and SVG in almost all major browsers, which is more robust than a single-vendor plug-in, and is ultimately better for authors and users.  The way to use it with HTML is now better defined:</p>
<ul>
<li>as with HTML, for SVG in text/html, you don&#8217;t have to use quotes on your attribute values (if the value doesn&#8217;t contain spaces, etc.)</li>
<li>authors don&#8217;t need to declare namespaces (in fact, this was the case with the Adobe SVG Viewer already, so not really much of a loss)</li>
<li>mistakes in casing for element and attribute names will be corrected</li>
<li>well-formedness errors will be recovered as best as possible, rather than halting rendering</li>
<li>custom namespaces, such as round-tripping metadata inserted by authoring tools, will not be supported</li>
<li>most importantly, normal valid, well-formed SVG with no custom namespaces will Just Work, whether as a standalone document or referenced as an external file, or inline in text/html or XHTML.</li>
</ul>
<p>In fact, though HTML5 is not yet done, SVG inline in text/html already works in special experimental builds of Firefox and Opera, and should work out of the box soon.  Forward-looking authors can already use SVG in modern browsers, using XHTML, and that content will soon work when served as text/html as well. The final barrier to common use of SVG is being solved by Brad&#8217;s &#8220;SVG Web&#8221; shim, allowing SVG content to work in IE.  This will not be a perfect solution; it would be better if IE supported SVG natively without making developers jump through hoops, but that won&#8217;t happen for at least a couple years (if at all), and SVG Web at the very least will bridge the gap.  I&#8217;ve seen it run, and it&#8217;s pretty impressive already.</p>
<p>That SVG has had to bend in the wind gives the SVG language a unique opportunity to innovate.  If the syntax is already going to need an update in existing browsers and authoring tools, we can reexamine some old assumptions and past missteps, and extend SVG to be better integrated with HTML and CSS and existing scripting practices.  And even more importantly, we can examine use cases and make SVG better suited for what authors need to do.</p>
<p>Why is HTML5 a powerful enough platform that Google throws it&#8217;s weight behind it, despite the inaccurate and ungainly name?  Is it the error-correcting parsing?  No, that&#8217;s a good feature, even if the need for it is unfortunate, but it&#8217;s unclear that this is better than XHTML.  Is it the new features like the &lt;video&gt; and &lt;audio&gt; elements, which allow it to compete with the most common use of Flash?  No, that capability has been possible using XHTML and SMIL for years, and is even part of SVG Tiny 1.2 (N.B.: HTML&#8217;s script interfaces are simpler and better than SMIL&#8217;s, but its lack of synchronization or timing containers is a big step back).  Is it the new WebApp-centric user interface focus?  No, we would probably be better served by a language designed for making UIs (like XUL).</p>
<p>So, what is the true power of HTML5?  Coordination.  Getting all the browser vendors to standardize on a common set of features.  HTML5 is not a technical achievement, it&#8217;s a social movement.  It&#8217;s an instantiation of the Open Web in the form of several specifications across several groups, and implemented fairly uniformly across all major browsers and platforms.  This is largely in response to user demands to the browser vendors.  They are tired of the special-casing and workarounds that make their lives and jobs harder and less satisfying, that make users struggle&#8230; they want a consistent platform, one without script libraries or shims or plug-ins or arcane rules.  And the browsers realize this, and know that a rising tide raises all ships.</p>
<p>My personal advice to vendors who have excellent authoring tools, but who want to also control the runtime environment?  The Web has moved on from vendor lock-in and black-box plug-ins.  In a world where there is coordination between multiple vendors to deliver and support a central set of technologies, where everyone is unifying on a standard Open Web platform, from Apple to Google to Mozilla to Nokia to Palm to Opera to Vodafone.  Nobody wants the hassle of being the only one to maintain the platform, but they all want the ability to change it without going though the gatekeeper of a single vendor.</p>
<p>It&#8217;s all platform games, and if you want to play, you have to jump to the next platform.  Google knows this&#8230; they are hosting the next SVG Open, and are aggressively pushing the whole platform.  Looks like a fun year ahead!</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/platform-games/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Site Unseen</title>
		<link>http://schepers.cc/site-unseen</link>
		<comments>http://schepers.cc/site-unseen#comments</comments>
		<pubDate>Sun, 29 Mar 2009 19:48:27 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=93</guid>
		<description><![CDATA[<br/>So, I don&#8217;t really pay much attention to my blog, or my site stats, or any of that&#8230; probably not nearly as much as I should, given how effective a medium blogs are at promoting ideas in the Web Standards profession.  I tend to write quite a lot, but most of it is emails to [...]]]></description>
			<content:encoded><![CDATA[<br/><p>So, I don&#8217;t really pay much attention to my blog, or my site stats, or any of that&#8230; probably not nearly as much as I should, given how effective a medium blogs are at promoting ideas in the Web Standards profession.  I tend to write quite a lot, but most of it is emails to various technical mailing lists, especially W3C lists.  I should probably pay more attention to getting ideas out into a broader public sphere, with more diverse comments and feedback, like you can do with a blog.</p>
<p>But not this blog&#8230; not right now.  Because this blog is <a title="Google search for this site" href="http://www.google.com/search?q=schepers.cc" target="_blank">invisible</a>.  If I recall correctly, I had a PageRank of 6, which seems to be moderately respectable.  But since my blog was <a title="Earlier post about insidious hackery of this site" href="http://www.schepers.cc/2009/03/unhacked/" target="_blank">hacked</a> (maybe because it had a PageRank of 6), no amount of PageRank will help, because Google has cut me off.  So, as I mentioned on my last post, I did all the voodoo, adjusted the bones just so, and asked Google pretty-please won&#8217;t they reindex my site.  They replied that they will think about it, in a few weeks (just slightly passive-aggressive in a way only the popular kid can be).  I wonder if my PageRank will emerge intact?</p>
<p>But on the up side, I took the opportunity to clean out my virtual attic.  I took down old content and databases and experimental installations of software, wiped out old user accounts and email addresses, and generally made it easier for me to manage everything.  Installing the latest version of WordPress also gave me the chance to reorganize the sidebar a bit, adding my Twitter feed and removing dead blogroll links (though I need to add some new ones).</p>
<p>I should also try to figure out a way to finally expose an index of all the hundreds of SVG files I have hidden in the back alleys of my site.  Some of them are just experiments, some are examples of best practice, some are fairly cool and elaborate, some are just conformance tests.  I&#8217;ve hesitated because some of them are also rather crappy code that was written for the Adobe SVG Viewer, and either doesn&#8217;t have a namespace declaration (so it won&#8217;t work in modern browsers), or it uses some feature not supported in most browsers.  I&#8217;ve now put up an <a title="Nothing to see here, yet" href="http://schepers.cc/svg/" target="_blank">empty placeholder</a> page, just to lay the groundwork.</p>
<p>I&#8217;ve also entertained the notion of running an index of <a title="My posts to public W3C lists" href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-2-name=from&amp;hdr-2-query=schepers&amp;index-type=g&amp;index-grp=Public__FULL&amp;resultsperpage=20&amp;sortby=date" target="_blank">my posts to public W3C lists</a>, but out of context, it probably wouldn&#8217;t mean anything, and wouldn&#8217;t offer more than you could get by just searching the lists manually.  Maybe a weekly summary would be better?  Or maybe no mention of it at all would be most preferable&#8230; I think a certain amount of silence from me would do me and the people around me a world of good.</p>
<p>Maybe getting blocked by Google is a good thing after all&#8230; <img src='http://schepers.cc/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/site-unseen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVG Tiny 1.2 Staggers Across the Marathon Finish Line</title>
		<link>http://schepers.cc/svg-tiny-12-staggers-across-the-marathon-finish-line</link>
		<comments>http://schepers.cc/svg-tiny-12-staggers-across-the-marathon-finish-line#comments</comments>
		<pubDate>Mon, 19 Jan 2009 04:08:11 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[14 January 2003]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=79</guid>
		<description><![CDATA[<br/>Wow.  After a ridiculously long time in preparation, with political battles along the way, and a long slog of making tests and maintaining older versions of the spec, as well as working on supporting specs like Element Traversal and DOM3 Events, SVG Tiny 1.2 is finally a W3C Recommendation.  Whew! I say &#8220;finally&#8221; for a [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Wow.  After a ridiculously long time in preparation, with political battles along the way, and a long slog of making tests and maintaining older versions of the spec, as well as working on supporting specs like <a title="Element Traversal Recommendation" href="http://www.w3.org/TR/ElementTraversal/" target="_blank">Element Traversal</a> and <a title="DOM3 Events Working Draft" href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html" target="_blank">DOM3 Events</a>, <a title="SVG Tiny 1.2 Recommendation" href="http://www.w3.org/TR/SVGTiny12/" target="_blank">SVG Tiny 1.2</a> is finally a W3C Recommendation.  Whew!</p>
<p><span id="more-81"></span>I say &#8220;finally&#8221; for a few reasons:</p>
<ol>
<li>It&#8217;s taken too long between revisions of the spec, demoralizing the SVG community and losing market interest</li>
<li>The spec has been 3 months away from being finalized since I first joined the SVG WG in January of 2006, and again when I joined the W3C staff in July of 2007</li>
<li>Cutting edge for its time, SVG no longer has the lead over Flash for mobile devices in terms of features</li>
<li>Mobile devices are now more powerful than when the spec was first started, so some features that were cut out to fit on older devices now could work just fine</li>
<li>SVG Tiny 1.2 has been already had multiple implementations for mobile phones and embedded devices for something like 3 years</li>
</ol>
<p>After 3 years in the making, SVG 1.0 was published as a Recommendation on <a title="SVG 1.0 Recommendation" href="http://www.w3.org/TR/2001/REC-SVG-20010904/" target="_blank">04 September 2001</a>.  SVG Full 1.1, was published <a title="SVG Full 1.1 Recommendation" href="http://www.w3.org/TR/SVG11/" target="_self">14 January 2003</a>, and the 1.1 mobile profiles, SVG Mobile and SVG Tiny, were published the same day, <a title="Mobile SVG Profiles: SVG Tiny and SVG Basic" href="http://www.w3.org/TR/SVGMobile/" target="_blank">14 January 2003</a>.  The SVG 1.2 family started way back in <a title="First Public Working Draft of SVG 1.2" href="http://www.w3.org/TR/2002/WD-SVG12-20021115/" target="_blank">15 November 2002</a>, following quickly on the heels of earlier specs, and the first draft of what would become SVG Tiny 1.2 dates back to <a title="First Public Working Draft of Mobile SVG Profiles: SVG Tiny and SVG Basic, Version 1.2" href="http://www.w3.org/TR/2003/WD-SVGMobile12-20031209/" target="_blank">09 December 2003</a>.  But various detractors of SVG threw a monkey wrench into the gears of SVG, thinking that it went too far in the direction of providing a Web application framework (one of the more common uses of SVG), and wanted to promote HTML and CSS for the same purpose.  Why not use both together, which seemed like an obvious solution?  Maybe because none of the major browser vendors supported SVG natively, and they did support HTML and CSS.  So, in a hail of hostile comments, the SVG WG hunkered down to improve the specification and the test suite, to meet higher standards than any previous W3C browser-centric specification had been held to.  Fair enough&#8230; it&#8217;s a new era, with more major browsers than ever before, and a greater need for interoperability.</p>
<p>So, that&#8217;s the bad news&#8230; what&#8217;s the good news?</p>
<p>Well, first, SVG is finally a Recommendation, and is broadly supported on mobile devices.  The SVG WG is already working on several specifications (we&#8217;re calling them modules) to build on existing SVG specifications (SVG Tiny 1.2 or SVG 1.1) and extend the feature set, to make it easier to author and to do cool stuff (as I&#8217;ve mentioned before).  The SVG WG is working with the HTML WG (some of the same folks who wanted to reanimate HTML&#8230; they achieved their objective) to make it easy to use SVG inline in HTML (that&#8217;s text/html&#8230; it already works in  XHTML), which should allow folks to make some pretty slick content.  SVG 1.1 is widely implemented in toolkits and authoring tools (<a title="Inkscape, a free open-source art editor" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.inkscape.org%2F&amp;ei=O8pzSbPMHdW5tweqy7znCA&amp;usg=AFQjCNE70ocRGcdCMwJsOZQ7zgFNw5HGTg&amp;sig2=UccBhC71Zu3utYZHgspZDw" target="_blank">Inkscape</a>, Illustrator, and others), and works fairly interoperably (though not perfectly so, yet) in Firefox, Opera, Safari, and Chrome&#8230; all the major browsers except Internet Explorer (so far).  And Mozilla has hired a dedicated developer, the mighty <a title="Jonathan Watt's crappy homepage... he's really much more impressive than it would indicate" href="http://jwatt.org/" target="_blank">jwatt</a>, to improve their SVG support and to participate in the SVG WG.</p>
<p>The SVG WG has taken to heart the lessons of the past (most of us are second generation SVG WG members), and have higher standards for producing good specs and comprehensive test suites, and are excited about polishing the edges of SVG so that it works well with HTML, CSS, and the WebApps WG specs (like XHR, Element Traversal, Selectors API, Widgets, etc.).  We know that the future is in mixed-namespace content (what I call &#8220;blendups&#8221;, SVG+HTML+CSS+JS, all working together, and with shared interactivity).</p>
<p>All in all, though the path to this point has been too long, I think the road ahead for SVG, and Open Web development in general, has turned a corner.  Now we just need to keep meeting those milestones.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/svg-tiny-12-staggers-across-the-marathon-finish-line/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

