- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Sat, 29 Aug 2015 13:50:32 +0200
- To: hugh.guiney@gmail.com, www-svg@w3.org
Tab Atkins Jr.: >This isn't even something for the SVGWG to decide; it's simply >impossible to add new elements to HTML's <head>. <head> autocloses >when it sees any element that's not <title>, <meta>, <link>, <script>, >or <style>, and people depend on this behavior - there's definitely >pages out there where an <svg> element is the first content and needs >to be displayed. > >Just put a <defs>-only <svg> in the <body>. Its location doesn't >actually matter, it's fine. It is pretty simple to avoid such complications, by just using an XHTML version, respectively the XML variant of HTML5 instead of the tag soup variant. Ian Hickson explained already years ago in a discussion about metadata from other namespaces within (X)HTML, that one simply has to use the XML/XHTML variant to do this. XHTML is extensible and uses the namespace approach, therefore specific problems and restrictions of the tag soup variant are not relevant here. Authors should simply forget about the complex and restricted tag soup variant, because it is inefficient and superfluous from the point of an author of new documents at least. About the idea to put it somewhere in the body - assuming that there are anyway svg elements with graphical content, it should be technically no problem to choose the first one to add such a defs-area ... On the other hand, if we assume, that the XHTML output is composed for example with PHP, it might be pretty useful to be able to reuse issues from the head within the body in a structured output (not only for SVG content). Unfortunately still (X)HTML itself has no functionalities like SVGs use or tref, this could have avoided several questionable technical evolutions of the past ... Hugh Guiney: >But it is currently illegal in the HTML spec because SVG does not distinguish >between embedded and metadata content models for its elements, Well, SVG has the elements title, desc, metadata, defs, script, style. It distinguishes between different types of not directly graphically presented structures. In general you only have to put an svg element around such a structure, if you embed it in (X)HTML. Depending on the SVG version there can be different restrictions on the question, what is allowed to reference from other documents or from other, independent svg elements, one has to look into details, whether there are maybe gaps in the recommendations, not covering such a use case. Olaf
Received on Saturday, 29 August 2015 11:50:57 UTC