USE OF COLLABORATION TOOLS

Click to see the XML version of this web page. rss 2.0

updated: 10/1/02; 4:32:13 PM.


Outline browser bookmarks

activeRenderer vs 1.1.3 Released

© copyright 2002
by Marc Barrot

>

Wednesday, September 18, 2002
> Transclusion Rendering Hits A Wall

Cryptic title isn't it ? Rendering in this context refers to the translation of OPML format outlines to regular HTML pages viewable in Web browsers. That is activeRenderer's main job.

Transclusion refers to the expansion in place of outline nodes that link to other OPML resources over the Web so that linked contents become seamlessly integrated into the current document. Still interested ?

The UserTalk version of activeRenderer performs its trick when the original OPML outline is upstreamed to the public server.

To achieve transclusion in the browser, I needed an 'on the fly' rendering feature, completely separate from the Radio application: a lot of people reading outline rendered pages are not running Radio at all.

So I wrote an XSLT version of activeRenderer, and relied on an external W3C provided CGI like service for the 'instant' rendering. It works pretty well, as you can check from this demo. I chose not to rely on the browser for the XSL transform, since only MSIE 6 for Windows has half decent XSLT support. Recent Mozilla versions are even buggier when it comes to their XSL engine.

The next step was to write a 'transclude' Javascript function that gets invoked every time the OPML renderer hits a 'url' attribute with a '.opml' extension.

Relying heavily on Javascript DOM level 1 API, this transclude code creates an (invisible) IFRAME element in the rendered page, then modifies its location property to a request url computed from the url of the W3C server, the url of the XSL transform script, and the url of the target OPML outline. Presto, the rendered HTML is retrieved.

Still leveraging the DOM API, all that remains is to access the root DIV element in the retrieved HTML, and visibly insert it under the node that featured the link to the OPML resource, with a little formatting along the way.

But OUCH, that's where the wall hits !

For Javascript, an iframe is a frame is a window. Accessing the contents of a window originating from one domain (the W3C server) from a window originating from another (the original rendered outline) is a clear violation of the cross window security barrier, and accordingly raises an exception.

Now the rendered link's content sits just there in the browser, but it's out of reach ! Why didn't I think of this in the first place ? #@%$ !!

I still haven't found a decent way around the problem.

Currently, I'm creating iframes every time an OPML link is clicked, and insert them in place. It kind of works with Mozilla, as this demo shows, but so far I haven't been able to achieve a result with MSIE.

All right, if you've taken the time to read this geeky rant, I would appreciate new ideas to crack the transclusion nut open.

See also:  transclusion javascript outliner security browsers Permalink 12:27:56 PM.
>Checkout what Google suggests:


September 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Aug   Oct

dave subscribes to