Here is an email I sent on both XML-dev and SVG-dev as an answer to Tim bray inviting us to check out APXL, the XML grammar for the new Keynote software.
> The XML vocabulary for Apple's new "Keynote"
> powerpoint competitor. Apparently it includes a
> fairly complete vector-graphics facility.
Although I am by nature an Apple enthusiast (and already ordered Keynote) I must say I am a little puzzled by what I see from the XML grammar used by Keynote.
As you noticed, it includes quite a lot of vector graphics information, which I must note differs from SVG. What I wonder is why did they have to use a different grammar. From what I understood from Steve's keynote, Keynote leverages Quartz2D (OS X's fantastic drawing/imaging API). If you ever took a close look at Quartz2D you'll notice that feature-wise it is pretty much closely matches the graphics capabilities, main differences are compositing model (Quartz2D seems to only support SRC_OVER - don't quote me on that though, some experts from the SVG WG could offer more details) and maybe some filters. The bottom-line is that Apple could very much have built Quartz2D on top of SVG rather than PDF. It is also worth noticing that Apple took part in SVG 1.0.
I don't criticize Apple for not chosing SVG over PDF (although I wish they would use SVG), but I'm puzzled by why they are not using it in the Keynote XML grammar. Let's take a look at a few things that stroke me as blatantly weird things:
<g transformation="1 0 0 1 12 24.75">
Ok, the <g> element, which I guess is a pretty close mapping to SVG' s own <g>. However, the "transformation" attribute here reminds me of the SVG "transform" attribute. Different attribute name, and also different attribute grammar. SVG would have it written <g transform="matrix(1 0 0 1 12 24.75)">. Since it seems that feature-wise this is doing the same thing, why use a different grammar? There are other "close but no cigar" occurences such as the generic <shape> element with a "path" attribute close to SVG's <path> "d" attribute, gradients
Other dodgy things I've seen is APXL constantly avoiding leveraging CSS. Not only are there no CSS properties but rather (arguably regrettable in SVG too) presentation attributes and even <styles> elements, but also APXL fails to leverage CSS types such as RGB colors. Another weird thing is the failure to use reusable definitions for things like gradients. In SVG, one defines gradient elements (both linear and radial) once and can reuse them as many times he likes. In APXL we can see things like this:
<styles> <fill-style fill-type="gradient"> <gradient end-color="0.00392157 0.690196 1" start-color="0.6 1 0.8" gradient-angle="180"/> </fill-style> <dash-style pattern="none"/> <shadow-style opacity="0" radius="0"/> </styles>
We can once again see differences in the APXL grammar for gradients. You'll also see that drop-shadow is also done differently than the way you do it with SVG.
It seems to me that there are no graphics features in Keynote that are not available in SVG. Actually, there are similarities in the way that graphics data are expressed in APXL but I fail to see any SVG leveraging. I think this is quite dissappointing design from Apple and a bit of a dirty XML serialization to me. XML is great for defining open and interoperable grammars, but what's the point of re-inventing the wheel here?
Keynote does look real sexy though!