Re: More on SVG within HTML pages

Simon Pieters wrote:
> 4) Make SVG <metadata> a RAWTEXT element. This will silence the
> validator with little effort on Henri, while allowing authors to invoke
> an XML parser on its textContent to get the same stuff as they get when
> using XML, with more or less the same code path as when using XML
> directly. It would still allow validators to validate the contents if
> they want to. This has the drawback that if authors copy-and-paste only
> the start tag and only test in legacy browsers, the rest of the page
> will be eaten in new browsers. The content model of the SVG <metadata>
> element would need to change to allow plain text, at least in text/html.

This would have an effect on the suggested feature for browsers to allow 
exporting the SVG from HTML as a well formed SVG document.  It's likely 
that they would either have to strip the content of the <metadata> 
element, or output it in a CDATA section, or equivalent.  If they don't, 
and just try to output it as is, they have no way of guaranteeing that 
the result will be well formed.


   <rdf:RDF xmlns:rdf="">

When exported from HTML as XML would become:

   <rdf:RDF xmlns:rdf="">

So such content will not be able to safely round trip from XML to HTML 
and back again, without additional processing to reparse the metadata 
content as a fragment of XML.

I personally have no opinion about whether or not this a significant 
problem, just pointing it out as an issue to consider.

Lachlan Hunt - Opera Software

Received on Monday, 7 September 2009 18:21:16 UTC