Adobe AIR WebKit Doesn't Support Client-side XSLT?
Posted on Aug 31, 2007
After those two paths were blocked, I found an excellent beginners tutorial on client-side XSLT simply by loading the XML with the defined XSL template in the browser. The example they gave worked nicely in IE7, Firefox and even Safari on Windows. Seeing as Safari and AIR both use WebKit, I thought this might work in AIR. To my dismay, it did not. Here's what I did...Using Aptana which has awesome built-in AIR support, I created a simple AIR application. Rather than use the standard HTML default page, I changed the rootContent to use the books.xml from the example cited earlier like so:
<rootContent height="480" systemChrome="standard" transparent="false" visible="true" width="640">books.xml</rootContent>
I then stuck the XSL the books.xml cites as its stylesheet in the root of the application as well. It uses relative pathing, so one thought is that perhaps I goofed up there. Here is the XML:
<?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/xsl" href="books.xsl"?> <books> <book> <author>Roth, Philip </author> <title>American Pastoral</title> </book> <book> <author>Hesse, Hermann</author> <title>The Glass Bead Game</title> </book> </books>
The net result is that when I run it, I get a window that says:
Roth, Philip Hesse, Hermann
Rather than one that looks like:
Some Good Books
- The Glass Bead Game by Hesse, Hermann
- American Pastoral by Roth, Philip
So, am I doing something wrong inasmuch as this needs to work differently in AIR than in a browser? Or does AIR not support the XSL transformations built into WebKit? If not, with AS3 not having XSLT (that I know of), is there any way to directly support it in an AIR application at the current time? If not, I think there should be.
Posted By Paulius Uza / Posted on 08/31/2007 at 11:41 AM
Posted By mike chambers / Posted on 08/31/2007 at 11:47 AM
Posted By Michael Repplinger / Posted on 09/01/2007 at 1:19 PM
Posted By Brian Rinaldi / Posted on 09/02/2007 at 5:39 AM
Posted By patrick / Posted on 10/05/2007 at 8:00 AM
i'm thinking of developing a uml editor and using describeType() then sending that to the webkit xslt processor and having clean valid uml returned...
bit of a hack but could be done quite easy i believe after reading this post...
i'll have to experiment with this feature though...
Posted By ryan / Posted on 12/19/2008 at 9:24 AM