W3C home > Mailing lists > Public > www-svg@w3.org > March 2006

RE: SVG12: SVGGlobal::document vs AbstractView

From: Jon Ferraiolo <jonf@adobe.com>
Date: Fri, 17 Mar 2006 12:43:21 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C8891DC3@namail3.corp.adobe.com>
To: "Bjoern Hoehrmann" <derhoermi@gmx.net>
Cc: <doug.schepers@vectoreal.com>, <www-svg@w3.org>


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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:34 GMT