W3C home > Mailing lists > Public > www-svg@w3.org > September 2008

[1.2T-LC] foreignObject content and referenced resource

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Sat, 20 Sep 2008 15:34:31 +0200
To: www-svg@w3.org
Message-Id: <200809201534.32307.Dr.O.Hoffmann@gmx.de>

Hello SVG WG,

doing some experiments with foreignObject I discovered, that there is some
information missing in the definition or description of foreignObject.
This should be clarified.


1. Compared to SVG1.1 the use of xlink:href is new, but in the attribute 
definitions is not mentioned, what should happen with the referenced 
resource (what can be almost everything according to 14.1.4 Reference 
restrictions), if a user agent decides to interprete foreignObject 
somehow.

For example for a referenced XHTML document (as well as for
embedded XHTML) Opera 9.5 decides to display the top left corner 
fragment of the referenced document into the area described by 
x, y, width, height attributes following the painters model (earlier 
other elements below, later elements on top).
Other parts of the referenced document beyond this area are not
accessible.

My guess is too, that it is at least intended, that the referenced 
document or a fragment of it is somehow displayed inside the
given area (following the painters model), if displayed at all.
But then this should be mentioned in the attribute definition 
as for image, use, animate, set etc or in the general 
description of the element, as for example for audio and video.

Another interpretation could be, that the xlink:href references
an alternative view, a description (xhtml:longdesc), something 
related to the foreignObject content. Or the content of 
foreignObject could be an alternative fallback for the 
referenced document similar to the behaviour of xhtml:object. 

(Side note: the element animation has a similar problem, it
is not mentioned, what the purpose of xlink:href is, however
this can be guessed, but I would like to suggest to replace
"The referenced SVG document represents a separate document 
which generates its own parse tree and document object model."
with
"The SVG document referenced with the xlink:href attribute 
represents a separate document which generates its own 
parse tree and document object model."
to cover this problem for the animation element, a similar
description could solve parts of problem for foreignObject as
well).


2. According to the SVG1.1 usage and the example
23_02.svg it is possible too to put the foreign content
directly inside the foreignObject.
If additionally an external resource is available with
xlink:href, what happens? What is the intended 
relation between the content and the document
referenced by xlink:href? 
Is it an arbitrary choice of the viewer, what will be
displayed if the viewer decides to display something
and we assume that both contents are displayable for
the viewer somehow?
a) Is the foreignObject content displayed only?
b) Is the referenced document displayed only?
c) are both content and referenced document displayed?
c1) is the content on top (because of the painters model and
the xlink:href is slightly earlier in the source code than the 
content?)
c2) is the referenced document on top?
d) should the viewer provide an interface to select, what
to display?

3. Obviously different from SVG1.1 in SVGT1.2 the
foreignObject currently does not create its own
viewport
http://www.w3.org/TR/SVGMobile12/coords.html#ElementsThatEstablishViewports

How is the foreign content aligned relative to the
user coordinate system? Is there a chance for the author
to influence, which part of the referenced content is
displayed, if a viewer like Opera 9.5 displays only a fragment
or is this the problem of the foreign language (for example
XHTML, typically creating scrollbars or other mechanisms 
automatically to get access to the content of the complete 
document)?
Is the content outside the x, y, width, height area always
clipped or is it on the viewer to decide this or on the author
to avoid this?
Received on Saturday, 20 September 2008 13:59:27 GMT

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