<?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; Browsers</title>
	<atom:link href="http://schepers.cc/category/browsers/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>Retain Accessibility Immediately</title>
		<link>http://schepers.cc/retain-a11y-immediately</link>
		<comments>http://schepers.cc/retain-a11y-immediately#comments</comments>
		<pubDate>Thu, 30 Jun 2011 04:43:09 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=488</guid>
		<description><![CDATA[<br/>There has been a heated argument recently on the W3C Canvas API mailing list between accessibility advocates and browser vendors over a pretty tricky topic: should the Canvas API have graphical &#8220;objects&#8221; to make it more accessible, or should authors use SVG for that? I think it&#8217;s a false dichotomy, and I offer a proposal [...]]]></description>
			<content:encoded><![CDATA[<br/><p>There has been a <a href="http://lists.w3.org/Archives/Public/public-canvas-api/2011AprJun/0040.html" title="hit testing and retained graphics from Richard Schwerdtfeger on 2011-06-17 (public-canvas-api@w3.org from April to June 2011)">heated argument recently on the W3C Canvas API mailing list</a> between accessibility advocates and browser vendors over a pretty tricky topic: should the Canvas API have graphical &#8220;objects&#8221; to make it more accessible, or should authors use SVG for that?  I think it&#8217;s a false dichotomy, and I offer a proposal to suggests a way to improve the accessibility potential of the Canvas 2D API by defining how SVG and the Canvas 2D API can be used together.</p>
<p>This brings together some ideas I&#8217;ve had for a while, but with some new aspects.  This is still a rough overview, but the technical details don&#8217;t seem too daunting to me.</p>
<p><span id="more-488"></span></p>
<h4 id="Retained-Mode_vs_Immediate-Mode_Graphics">Retained-Mode vs Immediate-Mode Graphics</h4>
<p>First, some background…</p>
<p><b>SVG</b> is a <b>retained-mode</b> graphics format, meaning that each shape persists as a separate object, with distinct characteristics such as location, size (bounding box), and precise outline (stroke).  These characteristics can be acted upon within the object structure (DOM) as discrete entities (or groups of entities) for manipulation by script or by user-interface actions (e.g. mouse clicks or keyboard tabbing); one of these interactions may be <a href="http://en.wikipedia.org/wiki/Hit-testing" class="external text" title="http://en.wikipedia.org/wiki/Hit-testing">hit-testing</a>.</p>
<p>The <b>Canvas 2D API</b> is an <b>immediate-mode</b> API, meaning that it allows the programmer to create visual shapes as individual pixels that are unstructured; in other words, if a red circle and a red square are drawn which overlap one another, there is no way to distinguish these from one another, or from the background canvas element (though a programmer could maintain a separate structure in script).</p>
<p>With <b>retained-mode</b> graphics, each object which is added to the DOM increases the memory &#8220;weight&#8221; of the page or application, potentially slowing down the browser or otherwise decreasing performance; by contrast, <b>immediate-mode</b> graphics, which are not represented as objects in the DOM, do not decrease performance, which is an advantage over <b>retained-mode</b> graphics.</p>
<p>Some accessibility advocates have noted that hit-testing and zooming are critical accessibility features of graphics; this requires the ability to access the location, size, and other characteristics of individual graphics.  Unfortunately, adding this retained-mode feature to an immediate-mode API effectively removes the primary advantage of using an immediate-mode graphics system.</p>
<p>However, by defining how SVG and the Canvas 2D API can be used together, a model may be created which allows authors to easily use both together, each for their appropriate strengths.  This approach involves two aspects: defining the behavior, and a potential shared API syntax.</p>
<h4 id="Defining_Behavior">Defining Behavior</h4>
<p>Currently, the Canvas 2D API is only defined to work with the &lt;canvas&gt; element defined in HTML5, and it does not allow SVG to be drawn or imported into the Canvas.  However, it could be extended to work inside SVG or to allow SVG to be used inside Canvas.</p>
<h5 id="Canvas_in_SVG">Canvas in SVG</h5>
<p>At its simplest, the Canvas 2D API could simply be defined to allow authors to draw on the SVG raster &lt;image&gt; element, just as it does in the HTML &lt;canvas&gt; element, but there does not seem to be a reason to limit it to this element.  The Canvas API could be defined to draw to any SVG element, rendering or structural, as an overlay.  It would be merely a visual effect, and would participate in the rendering structure, including &#8220;z-index&#8221;, only as its &#8220;target element&#8221; does.</p>
<h5 id="SVG_in_Canvas">SVG in Canvas</h5>
<p>SVG shapes could be allowed to be imported into the &lt;canvas&gt; drawing context, such that they render there but are also inserted into the DOM or shadow DOM.  Currently, as I understand it, this is not allowed for security restrictions involving content from potentially different sources, but for content that does not have external references (for example, a &lt;use&gt; element to another site, this should not be a security risk.</p>
<p></p>
<h6 id="SVG_in_the_Shadow_Tree">SVG in the Shadow Tree</h6>
<p>The accessibility features of the Canvas 2D API include a &#8220;shadow tree&#8221; and focus ring for those elements, such as text, which are not otherwise accessible to users with limited vision.  Each such &#8220;graphic piece&#8221; which is created and painted to the screen is also represented in this underlying shadow DOM (IIRC).</p>
<p>SVG elements used in conjunction with Canvas could also be placed in this shadow tree, so that navigability is preserved.  In order to save memory usage, a concept like the &lt;use&gt; element in SVG could alternative be used to &#8220;point to&#8221; an SVG in the main DOM from its appropriate place in the shadow tree.</p>
<p>SVG elements could either be used as visual shapes themselves, or could be invisible &#8220;hot-spots&#8221; for specific areas of the screen.</p>
<h4 id="Common_API">Common API</h4>
<p>I have <a href="http://www.w3.org/Graphics/SVG/WG/wiki/Simple_SVG_API">suggested before</a> that we create a simple graphics API that will allow either 2D Canvas (immediate-mode) or SVG (retained-mode) images with the same set of methods and parameters, with the only difference being which &#8220;mode&#8221; the author selects to have as the instantiated form.  If the author draws a circle to the canvas context, it would simply be drawn to the screen with no structure; if the author draws that same circle to the SVG context, it creates a &lt;circle&gt; element with the appropriate attribute values and style and inserts it into the DOM.</p>
<p>There would be certain differences in some of the renderings, because of the different rendering and compositing models of SVG and Canvas, and there would be certain specialized functionality and features each would have, but the majority of the visual appearance would be the same. </p>
<p>This would allow authors to learn only one API for 2D graphics for the Open Web Platform.  With this ease of learning and use, the author could decide on a case-by-case basis, even within the same application, which mode works best.  It would provide incentive to authors to use each to its best effect.</p>
<p>I call this approach <a href="http://schepers.cc/w3c/svg/api/cog.svg">COG: Common Open Graphics</a>.</p>
<h4 id="Example">Example</h4>
<p>An example of the effective use of SVG and Canvas together is a hypothetical game in which the user pilots a spaceship amidst an asteroid field.  </p>
<p>The background of the game includes animated nebulae, passing comets, rotating planets and moons, and other visual effects which are not interactive, and which do not affect the play of the game, but which add visual appeal.  The foreground of the  game (the &#8220;playable area&#8221;) includes asteroids, enemy ships, and energy beams that the player must dodge or shoot at, which increase in size the closer they get, and which benefit from hit-testing and keyboard focusability. The middle-ground of the game contains many smaller asteroids and ships that are not yet interactive, and so don&#8217;t need hit-testing or focusability.</p>
<p>Adding all of these graphics shapes as retained-mode objects in the DOM would unnecessarily increase the memory footprint of the game, degrading performance and playability.  However, since only a small number of these elements (those in the playable area)  need the retained-mode interactivity, the majority of them could be drawn with immediate-mode characteristics, then when a certain &#8220;distance threshold&#8221; is reached, changed to interactive SVG elements, perhaps using the same shared API.  This preserves the accessibility of the game, while also causing minimal performance degradation, and possibly even helping performance, since the hit-testing doesn&#8217;t need to be calculated in script.  From an authoring point of view, using the same shared API means that both types of shape, retained-mode and immediate-mode, are equally easy to generate and maintain.</p>
<p>To enhance the visual appearance of the SVG asteroids, the finer control of the Canvas API could even draw an overlay on the SVG stroke and fill areas, much as filters do, to show craters and other surface details in a more fine-grained manner then can be done efficiently in SVG.  Since this would be drawn specifically on the SVG element, the element itself would still provide the geometry and position characteristics.</p>
<h4 id="Caveats">Caveats</h4>
<p>This proposal has two caveats:</p>
<ol>
<li> Canvas can only be extended to be as accessible as SVG is, in this model.  Even with object retention, there are still many enhancements needed to make SVG truly widely accessible.  However, as plans for SVG accessibility improvements are made, these would be largely importable directly into the Canvas API, rather than working in parallel on two unrelated but overlapping graphics models.</li>
<li> Simply because the Canvas 2D API may be made more accessible, does not mean that all Canvas API applications or content will be automatically accessible, any more than all HTML or SVG content is accessible.  Authors will still need to use best practices and take specific steps to make their applications accessible.  This proposal only provides the means and the incentive to do so.</li>
</ol>
<h4 id="Feedback">Feedback</h4>
<p>I&#8217;m interested in feedback on this, either in the comments section of this blog, or on the W3C Canvas mailing list, <a href="mailto:&#x70;&#x75;&#x62;&#x6C;&#x69;&#x63;&#x2D;&#x63;&#x61;&#x6E;&#x76;&#x61;&#x73;&#x2D;&#x61;&#x70;&#x69;&#x40;&#x77;&#x33;&#x2E;&#x6F;&#x72;&#x67;">public-canvas-api@w3.org</a>.</p>
<hr />
<h4 id="Update">Update</h4>
<p>Someone pointed out offlist that this post emphasizes the accessibility aspect of this proposal, because that was the context of the most recent discussion, but this is a win for anyone who wants to do graphics in the browser, for any reason, not just accessibility.  Like any good accessibility feature, my proposal has general benefits, so it is more likely to be used in more content.  In the example scenario above, the developer gets the hit testing for free, regardless of whether or not Accessibility Technology is involved.  Other general advantages include ease of learning and use of graphics by developers (as mentioned above), sharing of features between modes (like using <em>Canvas.toDataURL()</em> to save an SVG as a PNG), pixel operations (like painting or detecting a color at a point) in SVG, metadata (like microdata, RDFa, or microformats) in select parts of a Canvas app, and so on.  I&#8217;m sure that clever people will come up with a whole boatload of cool things to do with a combined retained-mode/immediate mode API that I couldn&#8217;t imagine here.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/retain-a11y-immediately/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<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>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>Webmandering</title>
		<link>http://schepers.cc/webmandering</link>
		<comments>http://schepers.cc/webmandering#comments</comments>
		<pubDate>Sun, 24 May 2009 19:49:00 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=117</guid>
		<description><![CDATA[<br/>ISO 32000]]></description>
			<content:encoded><![CDATA[<br/><p>A while back, Henri Sivonen stumbled upon a diagram on the W3C site of the <a title="W3C Technology Stack" href="http://www.w3.org/2004/10/RecsFigure.png">technology stack</a>, a curvy-block Venn-diagram overview of the different technologies from W3C and where they fit into the Big Picture.  It&#8217;s an attractive diagram, but it oversimplifies things, and shows a decidedly W3C bias toward the Web.  It&#8217;s clearly been used past its expiration date, and those who consume it might feel a bit queasy.</p>
<p>Henri <a title="Henri Sivonen's critique of the W3C Web Stack diagram" href="http://hsivonen.iki.fi/technology-stack/" target="_blank">strongly criticized this depiction</a>.  He rightfully points out that HTML is not included in this vision (showing XHTML only, which looks a bit silly these days), but then complains that HTML5 and XHR are not included in the diagram.  But of course,  HTML5 isn&#8217;t even in Last Call yet, much less a W3C Recommendation, so it doesn&#8217;t really belong in that particular diagram (oddly, Henri credits XMLHTTPRequest to WHATWG, rather than its originator, Microsoft).</p>
<p>To his credit, Henri put his money where his mouth is, and took the trouble to make a <a title="Henri Sivonen's Web Stack diagram" href="http://hsivonen.iki.fi/web-stack/" target="_blank">diagram of the Web stack</a> the way he sees it, which presumably better reflects the &#8220;real Web&#8221;.  It omits many of the W3C technologies, and inserts some of the more common ones that aren&#8217;t from W3C (most notably Javascript).  It&#8217;s a good diagram, but oversimplifies the landscape dramatically.  He follows the W3C diagram in putting &#8220;Internet&#8221; at the base of the stack, but doesn&#8217;t correct it to include such ubiquitous technologies as email or chat (XMPP, IRC, etc.) even though those are often part of browser-based technologies (GMail, et al).  Of course, he deliberately omits intranets-connected devices, even though that&#8217;s part of the browser world, because the official doctrine of the WHATWG is that the intranets (including those that are partly open, such as at universities) are &#8220;not the Web&#8221;.  I will also quibble that he overlaps Accessibility only with HTML, not with SVG.  But most glaringly, he includes Ogg Vorbis and Ogg Theora, though they aren&#8217;t (yet!) really used on the Web, and omits the dominant technologies in that space, MP3 and Flash (and more specifically, H.264).  He covers himself here by saying that this is for a &#8220;contemporary browser&#8221;, with the insinuation that it doesn&#8217;t include plugins, though to users and authors that is a pale distinction.  He also neglects PDF (ISO 32000), which is all too prevalent on the Web, and which several browsers do render (if I recall correctly).  So, it&#8217;s not really a picture of the real-world Web stack, either.</p>
<p>The Frames remind us, in their song in <a title="Video of God Bless Mom" href="http://www.youtube.com/watch?v=rBFukR5UViQ" target="_blank">&#8220;God Bless Mom&#8221;</a>:</p>
<blockquote><p>You&#8217;ll see how hard it can be<br />
To keep your side of the deal,<br />
And you&#8217;ll see how hard it can be<br />
To keep one foot in the real.</p></blockquote>
<p>So, his diagram is flawed.  So what?  Why am I picking on it?  I&#8217;m not, really&#8230; it&#8217;s a good diagram, and it serves a certain purpose.  I&#8217;m picking on that purpose itself.  Henri was quick to criticize the W3C diagram (on a page where nobody can comment, I note), not because it wasn&#8217;t accurate, but because it advanced his agenda to do so (just as the W3C was advancing its agenda by making the original diagram).</p>
<p>Data visualization, like statistics or slogans, has a way of <a title="Wikipedia entry on Korzybski and map–territory relation" href="http://en.wikipedia.org/wiki/Map-territory_relation#.22The_map_is_not_the_territory.22" target="_self">territorializing the map</a>, in a kind of graphical <a title="Wikipedia entry on Gerrymandering" href="http://en.wikipedia.org/wiki/Gerrymander" target="_blank">gerrymandering</a>. I&#8217;m sure that Henri didn&#8217;t mean to make such glaring omissions, but I&#8217;m equally sure that the creator of the original W3C diagram didn&#8217;t have sinister motives either.  People get busy, and reuse what they have to hand that meets their needs, even when it&#8217;s sometimes not quite correct.</p>
<p>I really respect Henri, but what he fails to understand here, or at least to admit, is that different data visualizations are best suited for different audiences and different purposes.  He&#8217;s shown a clear bias in his diagram toward depicting the &#8220;Open Web Stack&#8221; (a bias I have to admit I share) and toward desktop browsers (which I find too narrow), with a Web developer audience.  That&#8217;s perfectly cromulent.  But his diagram is not at all suited toward showing the different work going on at W3C, and where it fits in the larger Internet, in an executive summary.  Both the offending W3C diagram and Henri&#8217;s own diagram are gross oversimplifications&#8230; which is the point of data visualizations.  The map is not the territory.  If I were to make a diagram that encompasses the Web tech landscape, it would include both W3C technologies and technologies from other sources, and code the origins with styling; it would clearly indicate which technologies are open (that is, not proprietary), which are under development and which are stable, and link each node to the definitive resource for that tech; it would not stack them up in a neat little box, but would show the interconnections via lines.  And it would serve a different purpose than either of these other diagrams.</p>
<p>Why was only XHTML included in that W3C diagram, and not HTML?  Wishful thinking.  Say it enough times, and it just might come true, and a picture is worth a thousand words.  We&#8217;re all dreaming the Web we want into reality, every day.  I&#8217;m tired of the false dichotomy that&#8217;s too often drawn between W3C and its members and participants.  How about we lay off the divisive rhetoric?</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/webmandering/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>CSS Link Hack in SVG</title>
		<link>http://schepers.cc/css-link-hack-in-svg</link>
		<comments>http://schepers.cc/css-link-hack-in-svg#comments</comments>
		<pubDate>Mon, 19 Jan 2009 04:09:15 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG Basics]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=80</guid>
		<description><![CDATA[<br/>While answering a question about styling SVG with CSS in the Freenode #svg IRC channel (yes, people still use IRC), I threw together a simple example to illustrate.  I like to do this, since in keeps me in practice, and gives me a chance to check the state of current implementations in the fast-changing world [...]]]></description>
			<content:encoded><![CDATA[<br/><p>While answering a question about styling SVG with CSS in the Freenode #svg IRC channel (yes, people still use IRC), I threw together a simple example to illustrate.  I like to do this, since in keeps me in practice, and gives me a chance to check the state of current implementations in the fast-changing world of SVG browser support.</p>
<p>The question was how to use CSS stylesheets, both internal and external, with SVG in <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=j99zScyjJ9G3twfL_7HpCA&amp;usg=AFQjCNE70ocRGcdCMwJsOZQ7zgFNw5HGTg&amp;sig2=sAOaMiBuMIHMSyZPUHVRdQ" target="_blank">Inkscape</a>.  While I know that Inkscape makes heavy use of CSS inline style declarations on elements (more than is to my personal taste, to be honest), I didn&#8217;t (and don&#8217;t) know if it has any UI features for adding internal stylesheet blocks, or links to external stylesheets.  So I made a little test&#8230;</p>
<p><a title="SVG example of styling" href="http://www.schepers.cc/svg/style/svgstyle.svg" target="_blank">svgstyle.svg</a></p>
<pre>&lt;?xml-stylesheet type="text/css" href="svgstyle.css" ?&gt;
&lt;svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="100%" height="100%" viewBox="40 0 145 70"&gt;

  &lt;style type="text/css"&gt;&lt;![CDATA[
     ellipse
     {
       fill: lime;
       stroke: green;
       stroke-width: 10px;
     }
  ]]&gt;&lt;/style&gt;

  &lt;rect id="inline" x="50" y="10" width="30" height="50"
        rx="5" ry="5"
        style="fill:lime; stroke:green; stroke-width:3px;"/&gt;
  &lt;ellipse id="internal" cx="103" cy="35" rx="15" ry="25"
        style="stroke-width:3px;"/&gt;
  &lt;circle id="external" cx="150" cy="35" r="25"
        style="stroke-width:3px;"/&gt;
&lt;/svg&gt;</pre>
<p><a title="CSS Stylesheet for SVG" href="http://www.schepers.cc/svg/style/svgstyle.css" target="_blank">svgstyle.css</a></p>
<pre>circle
{
   fill: lime;
   stroke: green;
   stroke-width: 10px;
}</pre>
<p>Which looks like this (at least, in Firefox, Opera, Safari, and presumably Chrome):</p>
<p><iframe src="http://www.schepers.cc/svg/style/svgstyle.svg" class="aligncenter" frameborder="0" width="290" height="140" scrolling="no">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>Both internal styles worked fine in Inkscape, but the external reference did not, showing just a black circle.  I&#8217;m not really surprised.  Note the clunky way that you have to link to external stylesheets in SVG:</p>
<pre>&lt;?xml-stylesheet type="text/css" href="svgstyle.css" ?&gt;</pre>
<p>That&#8217;s really XSLT-licious.  I have to confess, I don&#8217;t really care for <acronym title="Processing Instruction">PI</acronym>s (insert dated Magnum PI joke here), or XML prologs in general&#8230; they seem somehow clumsy and un-XMLy, like a throwback to SGML.  And as far as I know, they can&#8217;t be created or changed dynamically via clientside script.  Compare that to the relatively easy and straightforward X/HTML way of linking to external stylesheets:</p>
<pre>&lt;link href="svgstyle.css" rel="stylesheet" type="text/css"/&gt;</pre>
<p>In the SVG WG, we intend to allow authors to reference external stylesheets in a manner a little more modern and consistent with what authors are already used to using, in some upcoming spec.  We could do that a couple of different ways.  We could allow them to use an <code>xlink:href</code> attribute on the <code>&lt;style&gt;</code> element, in the same way we currently treat the <code>&lt;script&gt;</code> element (that is, if there&#8217;s a resolvable external link, we use that, otherwise we use the child content of the element), or we could add a <code>&lt;link&gt;</code> element like X/HTML, or both.  I kinda like the idea of allowing either.</p>
<p>To that end, I made a <a title="Link to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-link.svg" target="_blank">couple</a> of <a title="Style reference to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-style.svg" target="_blank">tests</a>, just playing around, to see if any browsers accidentally supported either of those options, by merit of having some shared codebase with X/HTML in their implementations.  Unsurprisingly, neither worked.</p>
<p>But then I had another idea&#8230; use the an <code>&lt;xhtml:link&gt;</code> element in the XHTML namespace&#8230;</p>
<pre>&lt;xhtml:link href="svgstyle.css" rel="stylesheet" type="text/css"/&gt;</pre>
<p>With this rather happy result, which works in at least Firefox, Opera, and Safari.<br />
<a title="XHTML link to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-link-xhtml.svg" target="_blank">external-link-xhtml.svg</a>:</p>
<p><iframe src="http://www.schepers.cc/svg/style/external-link-xhtml.svg" class="aligncenter" frameborder="0" width="150" height="150" scrolling="no">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>I don&#8217;t know if this is by design, or if it just fell out of the model, but I have to say I&#8217;m pleased as punch that it works.  If nothing else, it&#8217;s a great proof of concept for adding more ways of linking to CSS in the SVG spec.  This one goes in my toolkit, and I&#8217;m going to try to ensure that it gets standardized, if it&#8217;s not already there in some corner of some other spec.  Probably somebody already knows about this (hell, probably everybody does, and I&#8217;m late to the party), but for me it was a w00ty discovery.</p>
<p><strong>Update:</strong> <a href="http://mcc.id.au/">heycam</a> speculated that you might also be able to use <code>@import</code> rules, and <a title="Importing external CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-import.svg" target="_blank">indeed you can</a>:</p>
<pre>&lt;style type="text/css"&gt;@import url(svgstyle.css);&lt;/style&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/css-link-hack-in-svg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iSVG</title>
		<link>http://schepers.cc/isvg</link>
		<comments>http://schepers.cc/isvg#comments</comments>
		<pubDate>Wed, 10 Sep 2008 21:53:53 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=71</guid>
		<description><![CDATA[<br/>Since before the iPhone was released, there was speculation that it would support SVG.  After all, WebKit supports SVG, and Safari is based on WebKit, and the iPhone uses Safari.  But alas, the build of Safari that went on the iPhone did not include SVG support&#8230; nor, more famously, did the iPhone support Flash or [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Since before the iPhone was released, there was speculation that it would support SVG.  After all, WebKit supports SVG, and Safari is based on WebKit, and the iPhone uses Safari.  But alas, the build of Safari that went on the iPhone did not include SVG support&#8230; nor, more famously, did the iPhone support Flash or Silverlight. Rats!</p>
<p>Realistically, it doesn&#8217;t make a huge impact in the total deployment of SVG on mobile devices.  For all that they are cool, iPhones make up a pretty small margin of mobile devices.  Opera is probably deployed on more devices, and it&#8217;s supported SVG for a while.  SVG is used on the BlackBerry, as I understand.  The BitFlash and Ikivo SVG players are deployed on something like half a billion phones, both for content viewing and as the GUI of the device itself.  But&#8230; still, having it on the iPhone would be a bit of a coup, and would enable lots of neato Webapps.</p>
<p>And as of yesterday, when I updated the firmware on my iPod Touch, SVG is now supported natively!</p>
<p><span id="more-71"></span></p>
<p><a href="http://schepers.cc/svg/iphone/iSVG.png"><img class="aligncenter" src="http://schepers.cc/svg/iphone/iSVG.png" alt="An SVG rendering of an iPhone, with the SVG Logo, displayed on an iPod Touch, held aloft by a smiling Shepazu." /></a></p>
<p>It even support scripting!  Mouse over the lil buttons below the SVG logo&#8230;</p>
<p><iframe src="http://schepers.cc/svg/iphone/iScript.svg" mce_src="http://schepers.cc/svg/iphone/iScript.svg" class="aligncenter" frameborder="0" height="370" scrolling="no" width="200">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>But not yet SMIL (declarative animation) it seems&#8230;</p>
<p><iframe src="http://schepers.cc/svg/iphone/iSmil.svg" mce_src="http://schepers.cc/svg/iphone/iScript.svg" class="aligncenter" frameborder="0" height="370" scrolling="no" width="200">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>WebKit itself does support SMIL, so I&#8217;m guessing it&#8217;s only a matter of time before it works on the iPhamily as well.</p>
<p>Thanks to Luis Vielva for bringing this to the SVG community&#8217;s attention.</p>
<p>W00t!</p>
<p><strong>Update:</strong> Some folks have asked me what version I&#8217;m running: it&#8217;s v2.1, which is apparently not available for the iPhone itself until tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/isvg/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Third Time&#8217;s the Charm</title>
		<link>http://schepers.cc/third-times-the-charm</link>
		<comments>http://schepers.cc/third-times-the-charm#comments</comments>
		<pubDate>Mon, 18 Feb 2008 01:43:30 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=56</guid>
		<description><![CDATA[<br/>I&#8217;m here in Sydney to attend the SVG Working Group F2F. This marks the third time I&#8217;ve done this trip. When I first joined the SVG WG, I flew here for my first face-to-face meeting, and SVG 1.2 Tiny was in the can, no new features, only such changes as required by Last Call comments; [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m here in Sydney to attend the SVG Working Group F2F.  This marks the third time I&#8217;ve done this trip.  When I first joined the SVG WG, I flew here for my first face-to-face meeting, and SVG 1.2 Tiny was in the can, no new features, only such changes as required by Last Call comments; this was a bit frustrating for someone who set out to represent authors, since I really felt some new functionality was needed.  But it had already been too long between versions, and SVG 1.2 Tiny just needed to be published before new work could be started, so I took one for the team.  I was assured that it would be published and done within months.</p>
<p>Well, the best-laid plans&#8230; I was here last January again, and the same situation applied.   We&#8217;d received an avalanche of Last Call comments, from typos to tweaks to time-wasters to trip-wires.  It amounted to a sort of Denial of Specification attack.  Many of the comments were valid criticisms (though a few of those couldn&#8217;t be helped due to legacy or other dependencies), but an equal number were ideological.  But all of them had to be dealt with.  This had occupied the past year, and looked to occupy the foreseeable future, but we soldiered on.  The biggest chunk of work was dealing with errata for SVG 1.1, and with the test suite and implementor feedback (which is the point of &#8220;CR&#8221;, the Candidate Recommendation stage of becoming a W3C Recommendation).  We also split out some functionality into the WebAPI WG, so it could be more generally used by other Web technologies besides SVG.  So last year, it looked like one step up and two steps back.</p>
<p>And now another year has passed.  In this last year, I came to work for W3C directly, and the SVG WG has two new Chairs, one each from a desktop and a mobile implementor (Opera and BitFlash).  SVG 1.1 is better specified, due to errata, and better implemented, due to good, interoperable native implementations in Opera, Safari/WebKit, and Firefox.  SVG 1.2 Tiny is widely deployed on mobile phones (more widely than Flash Lite), due to excellent implementation by BitFlash and Ikivo, and has a good test suite that&#8217;s still growing (and will keep growing even after it&#8217;s published&#8230; can&#8217;t have too many tests).  We&#8217;ve cleaned up the SVG 1.2 Tiny spec, and made progress on ancillary specifications.  We&#8217;ve pared down what needs doing in order to move forward to the next stage on the Recommendation Track.  We&#8217;ve learned from past mistakes, and we&#8217;re working more openly with implementors and the general public.</p>
<p>And we&#8217;re talking about new features.  We spent a day this F2F planning several small modules for the next year or so that will add capability to SVG, and make it easier to author compelling content in this iPhone age.   SVG was a bit ahead of its time (especially as regards uptake in desktop browsers), but with the delays of the past couple of years, competing technologies are pulling ahead.  We&#8217;ve got an aggressive plan that includes bringing in more direct feedback from designers and developers, and targeted feature additions.</p>
<p>When I joined the Working Group three years ago, SVG was struggling and morale was low.  But now we&#8217;re really excited by all the recent progress and the momentum behind SVG.  This looks like a good year for SVG.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/third-times-the-charm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVG On Acid?</title>
		<link>http://schepers.cc/svg-on-acid</link>
		<comments>http://schepers.cc/svg-on-acid#comments</comments>
		<pubDate>Mon, 21 Jan 2008 07:00:59 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=54</guid>
		<description><![CDATA[<br/>ACID3, that is. Most of you will have heard of the ACID tests put together by the Web Standards Project in order to promote interoperability among browsers. Microsoft recently made a hit in the blogosphere by announcing that the next version of their browser, IE8, passed the ACID2 test, showing their commitment to Web standards. [...]]]></description>
			<content:encoded><![CDATA[<br/><p>ACID3, that is.  Most of you will have heard of the ACID tests put together by the <a title="ACID2 at WASP" href="http://www.webstandards.org/buzz/action/acid2/">Web Standards Project </a> in order to promote interoperability among browsers.  Microsoft recently made a hit in the blogosphere by announcing that the next version of their browser, <a title="IEBlog" href="http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx">IE8, passed the ACID2 test</a>, showing their commitment to Web standards.</p>
<p>Ian Hickson, who wrote the second ACID test, is now working on <a title="ACID3 test" href="http://hixie.ch/tests/evil/acid/003/">ACID3</a>.  He recently <a title="ACID3 Contest" href="http://ln.hixie.ch/?start=1200301306&#038;count=1">started a contest</a> to get contributions from the community on what features they want tested.</p>
<p>SVG has had a huge surge of popularity in the past few years; it&#8217;s now used on Wikipedia and Google Maps, and largely implemented in 3 of the 4 major browsers (it works in Opera, Safari, and Firefox).  There are a few inconsistencies between implementations, so we thought ACID3 would be a great chance for a push for SVG interoperability.  The SVG Working Group, most notably Erik Dahlstrom of Opera and Invited Expert Cameron McCormack, devised a few tests that we hope will be included in ACID3.</p>
<p>You can read the explanations for the tests, and see the tests themselves, in <a title="SVG ACID3 tests on SVG public list" href="http://lists.w3.org/Archives/Public/www-svg/2008Jan/0055.html">Erik&#8217;s email</a>.  Let us know what you think, and if you support the inclusion of SVG in ACID3 (and let Ian Hickson know, too).  Maybe by the release of IE8, it will pass ACID3 &#8211;and any SVG tests&#8211; too.</p>
<p><em>[originally published on the <a title="SVG on Acid on W3C QA" target="_blank" href="http://www.w3.org/QA/2008/01/svg_on_acid.html">W3C Questions and Answers blog</a>]</em></p>
<p><em>Update (25-01-2008)</em>: Just so you know, our efforts paid off.  Hixie accepted our tests, and SVG will be in slots  70-74 (or 75) of the Acid3 test.  I think this will be a great win for interoperability, and nice acknowledgment that SVG is a first-class citizen of Web architecture.  Thanks again to everyone who contributed to the tests and to the conversation, and to Ian Hickson for putting the tests in (and for driving Acid3 in general).</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/svg-on-acid/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Two Tech Predictions for the New Year (or So)</title>
		<link>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so</link>
		<comments>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so#comments</comments>
		<pubDate>Mon, 07 Jan 2008 18:50:41 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=50</guid>
		<description><![CDATA[<br/>Okay, first a disclaimer: none of this speculation comes from &#8220;insider information&#8221; I&#8217;ve gotten as an employee of W3C; but being surrounded by the swirl of standards, I suspect I may have picked up on a zeitgeist. I&#8217;m interested in seeing how well my predictions play out. Prediction 1: Microsoft will merge its browser and [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Okay, first a disclaimer: none of this speculation comes from &#8220;insider information&#8221; I&#8217;ve gotten as an employee of W3C; but being surrounded by the swirl of standards, I suspect I may have picked up on a zeitgeist.  I&#8217;m interested in seeing how well my predictions play out.</p>
<p><strong>Prediction 1: Microsoft will merge its browser and office platforms </strong></p>
<p>That&#8217;s what I would do if I were them.  Right now they are in a bit of mindshare competition with online apps, like Google Docs; as Web apps transition to the desktop (like, the downloadable desktop GMail client), Microsoft will take their core competencies (the desktop Office suite) and make it more Web-friendly.  They&#8217;ll take advantage of the fact that desktop apps are often more robust and speedier, and tie in the  chief benefits of Web apps: distributed authoring, ease of deployment, and ubiquitous availability.  To enable the latter, they also make a Office-lite Web app, sold as &#8220;software as a service&#8221;, for those who&#8217;ve bought the real product (though of course it won&#8217;t be as good as their desktop version); they might open this up in the razor-and-blade sales model.</p>
<p>They will merge two of their products, SharePoint Server and Exchange Server, into a sort of portal/wiki thing that ties into their new Office Browser.  They will probably integrate chat (MSN, or whatever) into the whole thing, so you have some uber-communications suite: email, chat, collaborative distributed document creation, and all that enthralling office goodness.</p>
<p>This could be IE8 (or IE9), or a totally new product, but it will probably be a new version of MS Office.  It will be their typical monolithic entry into the agile Web space.  And of course, it will use OOXML as a native format.</p>
<p><em>Why I&#8217;m wrong:</em> I think this would be smart, but the different divisions of Microsoft actually compete for resources.  I wonder if they could play nicely together for long enough.</p>
<p><em>Update (25-01-2008):</em> I&#8217;m actually going to Microsoft next week to talk about standards stuff.  Maybe I <em>will</em> get an inside scoop.</p>
<p><strong>Prediction 2: A cross-platform browser based on WebKit (but not Safari) will supplant Firefox</strong></p>
<p>WebKit has a cleaner, faster (if less complete) engine than Mozilla, and it&#8217;s already been reused by Apple for Safari, Nokia for their mobiles, Adobe for Apollo (I think), and by Google for Android.   But all those are controlled, as far as I can tell, by their name-brand deployers.</p>
<p>I think a new, more open repackaging will happen.   It will be standards-based, and truly open-source, from the engine on up to the executable.  It will implement Widgets (as being specified at W3C), so that people can make simple desktop applications based on common Web technologies.  But the key enhancement will be a new, cleaner, lessons-learned, easier-to-author Extensions platform.   Extensions, in my mind, are the most brilliant thing about Firefox, allowing slightly-above-average users to create new features for the browser, or to use features added by others; this gives great community buy-in.  But it will be even easier to do in this new browser; this will probably necessitate a new XUL-like language, too, so people can add chrome, or it might just be in the form of script APIs.   But what would be even smarter is to have the Extension editor, and Widget editor, built right into the browser, so making a new theme or feature or widget is as point-and-click as possible, with common tasks encapsulated (though for advanced enhancements, some scripting will be needed, in a smart editor with code completion).</p>
<p>Oh, and it will have SVG support.</p>
<p>Naturally.</p>
<p><em>Why I&#8217;m wrong:</em> This is just my dream browser.  Browsers are a hard market to break into, because there&#8217;s established competition, and you&#8217;re not making a product you can sell&#8230; you have to give it away.  There&#8217;s already a lot of momentum around other efforts.  But this is the browser I want.  Too bad I&#8217;m so lazy.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

