Robin Berjon wrote the following on 3/5/2009 8:51 PM:
On Mar 5, 2009, at 09:25 , Henri Sivonen wrote:
I don't have an informed opinion yet on whether enabling <svg> as
root in text/html is a good idea.
Scratching my head a little, I see no good reason not to allow it. In
fact, I think it would be a very good idea if we can work around some
of the few kinks.
As someone who uses a text editor to write SVG in XHTML+MathMl+SVG, I am
somewhat unclear on the use case for an <svg> root. Maybe I am confused,
but someone wants to start a document something like <!DOCTYPE svg>
followed by SVG elements with some HTML elements embedded in amongst the
SVG? There is a reason to do this? A reason that simply using XHTML will
not work? Sure, a couple extra characters at the top of the file, but
nothing too heavy:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
I no longer use a <?xml encoding... piece as the browsers I use do not
seem to need that line.
Even when the page is dominantly an SVG graphic with a hunk of XHTML
code inserted as a foreignObject,
http://www.comfsm.fm/~dleeling/kinesiology/runshine.xhtml, I still do
not see that the savings starting off in <svg>.
Besides, theoretically one could take the svg code along with the XHTML
foreignObject "island" out of that file, save as an svg, and render with
the XHTML as a foreignObject, no? I tried this and it worked, provided I
used an .xml ending:
http://www.comfsm.fm/~dleeling/tech/runshine-svg.xml (I do not control
the HTTP on the server, so to render .svg I would have to add back in
the <?xml... and <!DOCTYPE... lines. )
So what is the reason for wanting to be able serve this as text/html?
Sorry, I am easily confused.
Bear in mind I am using FireFox 3.1B2, if that makes a difference.
Forming an informed opinion would require research about existing
content and further discussion on what slippery slopes there'd be
It would make some amount of broken content that is accepted by some
implementations conformant. Based on my prior investigations into this
(admittedly outdated by now) this wouldn't break anything.
(such as the slippery slope of making <?xml encoding="..."?> set the
encoding in text/html which could easily break existing content and
which would be implementation-wise an annoying addition to the
already too crazy encoding information situation with text/html).
If the XML declaration doesn't set the encoding for (X)HTML served as
text/html, it certainly shouldn't for SVG. The same processing rules
should apply, based on the media type. That, of course, would be
entirely different in XSVG.
--
Dana Lee Ling
Professor
College of Micronesia-FSM/National site
http://www.comfsm.fm/~dleeling/ <http://www.comfsm.fm/%7Edleeling/>
Historically diverse, uniquely Micronesian and globally connected, the
College of Micronesia-FSM is a continuously improving and student
centered institute of higher education. The college is committed to
assisting in the developing of the nation by providing academic, career
and technical educational opportunity for learners in the Federated
States of Micronesia.
Go Sharks!