W3C home > Mailing lists > Public > www-svg@w3.org > December 2002

Re: SVG 1.2 - SvgWindow And SvgDocument

From: Sigurd Lerstad <sigler@bredband.no>
Date: Thu, 12 Dec 2002 00:46:02 +0100
Message-ID: <00e101c2a16f$76d27120$451273d5@mmstudio>
To: <www-svg@w3.org>

Hello,

I may not be the correct person to answer this, but I have an opinion,

What I think the WG is doing is trying to standardize the window interface
which already exist in all HTML UAs, I think there should be one common
window interface for all xml documents, html,svg, etc.
If there is no svgDocument, you would get hold of the window through
(whatever)Document, which for HTML as the root document would be a
HTMLDocument

Personally, I don't think that the Document interface should have a window
property, since this implies that there can only be one window per document,
And I think that the WG should start thinking that that may not be the case,
this is not the case in my implementation, there should rather be a
windowCollection windows property.

I also think that the WG should say that the View interface (as in
AbstractView and CSSView) should be implemented on the same object as the
window interface.

--
Sigurd Lerstad

>
> The SVG# group has been working on implementing the 1.2 SvgWindow
interface
> proposal, and we are running into some conceptual issues that I hope some
on
> the list can help with.
>
> First, here is the definition of the SvgDocument from 1.1:
>
> <SVG1_1>
> 5.17 DOM interfaces
>
> Interface SVGDocument
> When an 'svg' element is embedded inline as a component of a document from
> another namespace, such as when an 'svg' element is embedded inline within
> an XHTML document [XHTML], then an SVGDocument object will not exist;
> instead, the root object in the document object hierarchy will be a
Document
> object of a different type, such as an HTMLDocument object.
>
> However, an SVGDocument object will indeed exist when the root element of
> the XML document hierarchy is an 'svg' element, such as when viewing a
> stand-alone SVG file (i.e., a file with MIME type "image/svg+xml"). In
this
> case, the SVGDocument object will be the root object of the document
object
> model hierarchy.
>
> In the case where an SVG document is embedded by reference, such as when
an
> XHTML document has an 'object' element whose href attribute references an
> SVG document (i.e., a document whose MIME type is "image/svg+xml" and
whose
> root element is thus an 'svg' element), there will exist two distinct DOM
> hierarchies. The first DOM hierarchy will be for the referencing document
> (e.g., an XHTML document). The second DOM hierarchy will be for the
> referenced SVG document. In this second DOM hierarchy, the root object of
> the document object model hierarchy is an SVGDocument object.
>
> The SVGDocument interface contains a similar list of attributes and
methods
> to the HTMLDocument interface described in the Document Object Model
(HTML)
> Level 1 chapter of the [DOM1] specification.
> </SVG1_1>
>
> And here's the definition of the SvgWindow object from the 1.2 WD:
>
> <SVG1_2WD>
> 7.4 Window Interface
> The majority of scripted SVG documents in existence make use of the
browser
> specific Window interface, which includes methods such as setTimeout and
> clearInterval. SVG 1.2 will most likely specify an SVGWindow interface,
> taking into account the defacto standard that already exists.
>
> A method will be added to the SVGDocument interface to enable access to
the
> SVGWindow interface. The following is the current proposed Window
interface
> in IDL.
>
> Interface SVGWindow
> Interface SVGWindow provides a global object for scripts embedded in a SVG
> document.
>
> </SVG1_2WD>
>
> Here are a couple problems we are having:
>
> 1) What is the root object of an SVG object?  Is it the SvgDocument? or
the
> SvgWindow? or something new?  The SVG# team has gone round and round on
this
> issue, and I seem to think that we need something new, but more on that
> later.
>
> 2) If an SvgDocument doesn't have to exist (i.e if the SVG is inline with
> XHTML), how do you get a reference to the SvgWindow if you can only get to
> it off the SvgDocument?  The SvgWindow still needs to exist, even if the
> SvgDocument does not.  IMHO we need something like a SvgDocumentFragment
> which is associated with a SvgWindow.  This way no matter if the SVG
element
> is the root object of the document, just a document fragment contained
> within a document that has a root element of another namespace, or a
> document fragment contained within a SvgDocument, everything works the
same.
>   The SvgWindow describes the box (or canvas) that the associated
> SvgDocumentFragment can be rendered in.  To me, this model seems to be
more
> compliant with the CSS Box model.
>
>
>
> Don XML
>
> Always listen to experts. They'll tell you what can't be done, and why.
Then
> do it.
>
>
>
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
Received on Wednesday, 11 December 2002 04:44:54 GMT

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