RE: SVG12: SVGGlobal::document vs AbstractView

Bjoern,
--------
Since "The DocumentView interface is implemented by Document objects in
DOM implementations supporting DOM Views" I don't think this would be a
problem. The object would have all the methods and attributes from all
the interfaces implemented on the Document, SVGDocument, DocumentEvent,
DocumentTraversal,...
--------
But all we need is Document, or when the root element is <svg:svg>, SVGDocument. 

We don't need AbstractView or DocumentView. The only time one needs those two interfaces is when the format supports DOM2 Views, but SVG Tiny 1.2 (or any version of SVG) does not support DOM2 Views.

So, I think you have it backwards, with the tail wagging the dog (or cart leading the horse). Instead of leading with DocumentView, we need to lead with Document. Thus, the Global interface needs a:

  Readonly attribute Document document;

and if a particular language format (or implementation) wants to add support for DOM2 Views, then they add support for the DocumentView interface to all of the objects that support "Document".

Jon


-----Original Message-----
From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] 
Sent: Friday, March 17, 2006 11:29 AM
To: Jon Ferraiolo
Cc: doug.schepers@vectoreal.com; www-svg@w3.org
Subject: Re: SVG12: SVGGlobal::document vs AbstractView

* Jon Ferraiolo wrote:
>For ECMAScript, the entries on Global/SVGGlobal interface are supposed
>to be attached to the rootmost object within the ECMAScript scripting
>context, which means the Window object. Your proposed (a) would result
>in a 'document' attribute on the Window object which is of type
>"DocumentView" instead of type "Document". 

Since "The DocumentView interface is implemented by Document objects in
DOM implementations supporting DOM Views" I don't think this would be a
problem. The object would have all the methods and attributes from all
the interfaces implemented on the Document, SVGDocument, DocumentEvent,
DocumentTraversal, ... for the ECMAScript binding it does not make much
of a difference what the spec says here. It does make a difference for
IDL conformance, strongly typed languages, component models, ... For
those we would need to either do what I propose or drop what I propose
entirely, as far as I can tell.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Friday, 17 March 2006 20:43:48 UTC