Re: SVG Feedback on HTML5 SVG Proposal

On 3/11/09, Robin Berjon <robin@berjon.com> wrote:
> On Mar 11, 2009, at 02:31 , Dailey, David P. wrote:
>
>  Just think of the case in which you're trying to teach someone how to make
> web pages. You can say "if you put a <p>, you'll get a paragraph; and if you
> put a <rect>, you'll get a rectangle". That'll fly. But now you have to say
> "okay, so here you can do <p id=foo> but there you have to do <rect
> id='foo'>". How do you justify that? Learning the stuff is already

How about we teach them to quote all their attributes?  In my opinion,
there are already attributes in HTML that we should be teaching new
developers to quote (@title, @alt).

Has anyone considered if new HTML developers will find it confusing
that they need quoted attributes if they want to use spaces or quote
characters in the value?  Though it seems obvious to me and surely
obvious to parser coders, I wonder if new users will find that at all
confusing.

What are the thoughts on:

- svg:path's @d attribute
  - do we teach users to quote them in SVG-in-HTML mode if they want
to make semi-sane use of whitespace ?

Also, there are SVG attributes which do not seem to allow commas to
separate values:

- @preserveAspectRatio [1]
  - modify SVG syntax to allow commas to separate the
defer/align/meetOrSlice values? (spec is not entirely clear on this
attribute's grammar)

- @requiredExtensions [2]
  - modify SVG syntax to allow commas?

I guess these types of modifications belong in the SVG 1.1 and 1.2 spec?

My biggest concern with the quote-less attribute syntax is the
breakage when copying from a hand-typed SVG-in-HTML document to a SVG
tool.  There are already quote-less (albeit experimental) examples of
SVG starting to proliferate around the web [3].  If all desktop
browsers support a "Save As SVG" or "View DOM" option as Jonas brought
up then this would be less of a concern to me but that is not the case
today.  Furthermore, it will still be confusing to developers who are
used to View Source (another way of thinking about this is that "View
Source" is no longer 100% reliable and we have to train developers to
"View DOM" instead).  The other option is to rewrite the parsers on
all SVG tools (if that's even possible - will Adobe be willing to do
that with Illustrator?).

Alas, I already know which way the WG will head on this.  Quoteless
attributes are just too cool to pass up.

Regards,
Jeff

[1] http://www.w3.org/TR/SVGTiny12/coords.html#PreserveAspectRatioAttribute
[2] http://www.w3.org/TR/SVGTiny12/struct.html#RequiredFeaturesAttribute
[3] http://hsivonen.iki.fi/svg-filters-html5/

Received on Wednesday, 11 March 2009 15:35:14 UTC