W3C home > Mailing lists > Public > www-svg@w3.org > March 2009

Re: View Source (was: SVG Feedback on HTML5 SVG Proposal)

From: Jeff Schiller <codedread@gmail.com>
Date: Mon, 16 Mar 2009 19:51:27 -0500
Message-ID: <da131fde0903161751k105d38a0jbeb1879120ce3f81@mail.gmail.com>
To: Doug Schepers <schepers@w3.org>
Cc: www-svg@w3.org, public-html@w3.org
On 3/16/09, Doug Schepers <schepers@w3.org> wrote:
> Hi, Raman-
>
>  T.V Raman wrote (on 3/16/09 12:58 PM):
>
> > And this is why in gneral, it would be a good idea for
> > show-source to perhaps show a cleaned-up serialization, rather
> > than the original tag-soup that was authored.
> >
>
>  I think everyone is on board with this idea, not just for SVG and MathML,
> but even for HTML... if someone out there has a good rationale against it,
> I'd be curious to know what that is.  Note that there are a couple of open
> questions:

If all browsers got on board with this idea, I would be elated!  We've
been saying for years that authors aren't going hand-write HTML, but
reality has proven otherwise.  Perhaps this is the thing that would
finally help authors write proper code?  What - did I say something
funny?

>
>  1) Would the HTML (or other spec) *mandate* a "view source" mechanism? It
> could be on right-click, or as a menu option, or whatever; but as I
> understand it, the HTML spec steers well clear of any such normative
> behavior on UAs... I personally don't see why we couldn't make a conditional
> normative statement, such as, "For user agents which expose markup source
> code to users (such as a "View Source" menu option), the user agent must
> (should?) normalize the DOM serialization to present a valid and well-formed
> document."  It could go further and say, "For languages intended for use in
> XML parsers, such as MathML, SVG, or XHTML, the serialization must be valid
> for that language."  (Or something.)

HTML WG members have stated that they will not put any UI requirements
in HTML and leave them as *should* statements or recommendations or
whatever because it might not make sense for every UA... I personally
think your conditional requirement is fine.  In the end, browser
vendors are free to implement whatever parts of the spec though, so
even if it was a conditional requirement, some browsers might just
ignore it.

>
>  2) When it serializes it, what is the format for HTML?  Is it XHTML, or
> HTML5?  Looking to the MIME Type might not be appropriate, since "XHTML"
> (valid or not) doesn't render in IE, so folks serve it as text/html; going
> by the DOCTYPE might be a better indicator of author intent.  Or maybe some
> HTML5-specific attribute could be placed in the root.

Actually, I think the MIME type would be the only reasonable thing to
expect.  I wouldn't expect IE to be forced to show the XML
serialization since it's not an XML web browser.  The author is going
to serve the document to IE as text/html anyway (since that's all it
understands) and that's all I'd expect IE to sanitize.

Regards,
Jeff
Received on Tuesday, 17 March 2009 00:52:05 GMT

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