Categories
SVG

SVG Onward

I finished the static chapter on SVG for the book and it has become the largest. I imagine the programming chapters could get larger. One doesn’t realize how rich SVG is, until one really looks at the individual components and realizes what you can do with the technology.

It’s nice to see that the HTML5 working group is now considering the need to include SVG in the specification. According to Anne van Kesteren:

The other interesting thread is about an HTML compatible syntax for SVG. In other words, integrating SVG in text/html. Now that an HTML parser, that is compatible with deployed content and Web browsers, is defined, it is possible to create small extensions on top of it that enable new tricks. As SVG is essentially a DOM-based language the only thing the parser will have to ensure is that the elements end up in the right namespace in the DOM.

The comment thread is interesting, but when I see discussion about changing the SVG specification just so it’s more compatible with HTML5, I run cold. Really cold. The thread also highlights my own concerns with HTML5 and trying to integrate semantics using syntax rather than a model, as people worry about whether opening the door to SVG won’t open the door to RDF and other such nonsense. After all, who wants to muck up the burger (using Anne’s colorful description of the next generation of tag soup) with open, mature specifications? That would be like Hardee’s trying to create a healthy, low calorie sandwich.

Sam Ruby, who is much more tolerant of burgers than I am–but then, he also patiently works with RSS 2.0, the XML equivalent of a Twinkie–also linked other discussions on SVG, which, I agree with Sam, are nice to see.

The first post he links discusses Microsoft and Adobe’s impact on SVG with assurances that neither company is out to kill SVG. Yes, but neither company is out to support SVG, either. Supporting it as an export format is not enough. IE doesn’t support SVG, and Adobe is pulling it’s *popular SVG plug-in in January. End of story.

(Interestingly enough I just dropped the planned Flash/Flex and Silverlight chapters from my book, in order to make more room for the non-proprietary specifications such as SVG.)

The comments in Sam’s post reflect what’s happening in Anne’s post, including the re-occurring question of just using the object or img element to include SVG, rather than allow inline SVG. The use of object as compared to inline isn’t just an issue with SVG, as Jacques Distler points out in comments, specifically directing attention to MathML. Jacques also discusses allowing inline SVG and MathML in comments; allowing the object element in comments is not something most of us would want to contemplate. I’m sure that if I did allow object or scripting elements in my comments that you would have no hesitation on opening the pages in your browser.

In addition, the whole point of SVG, or one would just use a converter to convert SVG into PNG format, is that SVG, being a vector language, can become part of the page DOM, which means we can then ‘do’ things with the SVG when loaded. We may not want to, but wouldn’t we rather have this option than not?

Sam’s proposal is to use the script element to bring in SVG. The benefit to this is that we can then include SVG in the page, and ensure it’s loaded into the DOM if we wish. Without having to redefine the semantics behind ‘img’, I want to add. The idea has limitations, which Sam points out. Using the script element is, however, preferable than just blowing SVG off for the HTML folks. Or bunging it into object, like we bung everything else into ‘class’ or ‘rel’.

One of the commenters, Chris Jay, wrote the following in comments to Anne’s post:

But on principle, I don’t support inline svg elements, because they’re not semantic, they’re presentational. Colors, gradients, filters, crops, shapes, and even geometry (e.g. rotation), should be put in CSS instead, so they can be applied to ANY element.

Many of these are being added to CSS, but CSS isn’t meant to control the creation of objects. There is no place in CSS for creating a rectangle, polygon, or polyline, much less a path or a text object. As for using CSS to control the presentation of these objects, we have much of this already. We can include SVG presentational information in a style attribute, if we want. True, something like a gradient is an object in SVG rather than an attribute is that it is a complex object with attributes and modifications of its own, which can then be used to ‘fill’ other objects. But then, so can paths–paths can be used to build patterns.

The point is, ten years ago the big thing in web page markup was presentation and we had FONT and BLINK, and now the big thing in markup is ‘semantics’ and we have things like…the Canvas object. The datagrid, which is enabled for Ajax use. Drag and drop. Editable content. Stop me when we get to something semantical.

In the meantime, I’ll plug along with XHTML 1.1, where though I’m sometimes fed mustard yellow pages, at least I’m not at the mercy of the ‘semantic’ burgers.

Speaking of which, after my own recent experiences in inline SVG, I’ve decided three things:

1. For my uses of reusable SVG symbols, I plan on adding my own template tags and plug-ins that find these and replace them with SVG in the post, but not in the database or the syndication feeds. Until Mozilla/Firefox and Safari 3 get their act together enough to support external SVG fragments, repeating blocks of SVG text in the database is not something I contemplate with equanimity. I should be able to create reusable blocks of SVG and use them thus:

<use xlink:href=”symlibrary.svg#musicnote1″ width=”15″ height=”10″ />

Opera supports this. Safari 3 doesn’t, and neither does Firefox 3. IE? *giggle* That’s funny.

2. I’m stripping SVG from syndication feeds. In many ways, this goes back to the question of what exactly a syndication feed is for, and how much we should provide in a feed versus providing at the source.

If I still had feed excerpts, the issue wouldn’t arise because all markup is stripped with excerpts. Yeah, feeds, partial or full, is a topic I bring up a lot, because it’s an issue that irritates me and, frankly, continues to irritate me. This irritation isn’t aided by the fact that WordPress makes it really difficult to support both partial and full feeds.

In the meantime, since serving a post with SVG as HTML in syndication feeds causes Atom hiccups, and the Atom feed is hard coded to display content as HTML, only, I’ll continue with my manually edited feed template until I have time to write some plug-ins. Or until Sam can get through the modifications he makes into the general WordPress code. Whichever comes first.

3. I’m contemplating adding SVG support in comments. Just contemplating, though.

Update

I’m now seeing that the Adobe SVG Viewer plug-in may be available until 2009. I don’t know if this is a typo or not, because the front page for the install still shows January, 2008.

Categories
Photography Plants

Little Tree

Bonsai tree

Categories
Semantics

Better living through chemistry

I find it funny that I’m currently being inundated with drug comment spam, just after Danny Ayers pointed out the fact that the pharmacy industry is adopting the ‘orphaned’ semantic web:

The World Wide Web Consortium (W3C), the Internet standards arbiter that developed the HTML content description protocol, released a new standard several years ago called the semantic Web. Operating on linkages between data called triplets, in which two URL-based pieces of information are connected by a recognizable relationship in a kind of subject-verb-object arrangement, the semantic Web gained far less momentum with programmers than did HTML, which can be searched on the basis of written language.

However, the so-far-neglected standard, which relies on extensive and standardized coding of Web-searchable data and documents, may soon be adopted by the big drug companies, where a coterie of information technology (IT) specialists see its potential in organizing R&D data and expediting drug discovery and development—where a triplet might include a specific compound and a functional relationship of that compound to a specific cellular receptor.

“Many pharmaceutical companies are exploring the use of the semantic Web,” says Susie Stephens, principal research scientist for discovery and development informatics at Eli Lilly & Co. It is one of many avenues Lilly is investigating to develop a research IT regime, she says.

The entire article is surreal. And funny! Triplets!

Perhaps someone went home with one too many “semantic web” samples.

Categories
Technology Writing

Notes from the book part two

Summary:   Wherein author picks up both stick and carrot, paying particular attention to the attached metadata: Me relate stick. Me relate carrot. Me class hitting. Stick class hit. Carrot class eat. Me relate Microsoft. Translation: I am hitting the stick with Microsoft, while eating a carrot.

  • Open source developers, providers of free or inexpensive shareware applications, those working on open standards and specifications, or providing documentation, tutorials, and help for all of the above: you almost make me believe there is a land over the rainbow, and that it has fairies and unicorns and we never have to wear shoes. I don’t thank you, as often enough, and as much as you deserve.
  • Speaking of which: whoever came up with the original idea for CSS, you deserve chocolates
  • Everyone is mad at Apple for iPhone, but I don’t care: Safari 3 is a wonderful browser. Color management, far out. And Opera? Thanks for standing up for standards. Firefox, you’re cool, too, but you need to commit to implementing one spec before you start on others. Oh, and it would be really nice if you didn’t crash so much. No, really that would be cool.
  • The WhatWG and (X)HTML5 efforts are, in my opinion, not the best use of resources. We’ve spent years separating presentation values from page layout, only to turn around and make the same mistake with semantics. Accessibility is in; accessibility is outMachine versus human semanticsIndent versus blockquote. Hey! Poem markupSVG isn’t ‘semantically rich’ . When semantics have to be hard coded into the syntax, satisfaction will never be guaranteed. Open models, not new specs. When will they ever learn? When will they e-v-e-r learn.
  • Regarding microformats: Using “rel”, “class”, and “profile”, as the only available means in which to add semantics to markup is the same as using LOLCats to re-define the Bible: it’s pidgin markup. “Me class sitting. Me relate chair. Chair relate desk. Me class watching. Me relate windows. Window relate Woman. Woman class running. Woman relate street. Woman class feeling. Feeling relate weather. Weather class cool. Weather class fall. Me class wistful. Me class wishing. Me relate woman.”–this is my sad attempt to describe my sitting in a chair at my desk, looking out through my open window at a woman jogging along in the wonderfully cool fall weather, wishing I was her instead me being here at the computer. At some point in time, simplicity breaks down and you want a richer method in which to express your meaning.
  • Chew on this: pictures as data, as well as visual, entities.
  • Canvas is cool, but SVG is better. It’s not just because SVG elements become part of the Document Object Model (DOM) and are easily scriptable. It’s because we can find SVG similar to what we want, copy it, manipulate it, and we don’t have to know any scripting. I wanted images of musical notes and searched on “music notes svg”, which led me to this Wikipedia page and this (as well as this) public domain SVG. I copied the SVG file and deleted the SVG creating the bars–no bitmap tool magic needed to pull the notes separate from the bars. I split the notes into two separate images by coping and pasting the two different elements. I copied the SVG for both into this post, and scaled them into tiny little representations of themselves. Though the browser had to reach to scale them so small, we’re not left with a tiny little bitmap blobsI did think about using the following image, copied from this resource. Oh look, the original SVG contains metadata defined using RDF/XML. Isn’t it marvelous when you can merge rich, well defined XML vocabularies together? Just like that?
  • Silverlight: Why? There’s nothing in Silverlight 1.0 that doesn’t exist as an open standard and can’t be supported for IE applications–if Microsoft would just support them. Silverlight as a 2D graphics system? Both SVG and Canvas are 2D graphics systems. Microsoft supports form controls like buttons? Hey! Guess what we’ve had in HTML for years? Silverlight 1.1 integrates web browser and ASP.NET functionality, which means you can use your Microsoft Visual Studio and Microsoft Web Expression applications to create Rich Internet Applications? Fantastic! It still doesn’t change the fact that Microsoft pushed its browser on the same developers it’s trying to suck into the Silverlight world, and then abandoned it, and us, for five years; effectively holding up advances in internet development for half a decade.
  • Adobe Flex/AIR: Why? It’s true that Flash has done much for us over the years, and we’re grateful, but we’re ready to move into a new era of open standard applications and, frankly, Adobe, you’re rather hit and miss when it come to ‘open’ and ‘standard’. Take your SVG plug-in. It’s cool and we thank you for providing it so that IE users could see what they’re missing using a half-assed browser. Now you’re going to pull the plug-in and your support for it. Why not open source it, and let the open source community decide if it wants to continue to support it? Is it because, as has been noted elsewhere, you want us to consider converting [our] SVG application to an Adobe Flex® application? Golly, I just love these opportunities to get sucked into another bloated, proprietary application environment. It makes me feel so good when you finally, inevitably, stop.
Categories
Weather

Dodging bullets

St. Louis dodged the bullet this week, but then got hit with the canons. From Jo Mannies, my favorite columnist at St. Louis Today:

President George W. Bush is cancelling his plans to visit St. Louis on Thursday, and is instead flying out to California to view the damage caused by the wildfires and comfort victims.

Saved!

Vice President Dick Cheney will be coming here Thursday instead.

Not!

President Bush flying to California during the disaster…that’s interesting. He did the same thing during Katrina. Must be a jerk reaction.

Oh, sorry, I meant knee jerk reaction. Damn keyboard.