W3C home > Mailing lists > Public > www-svg@w3.org > May 2012

Re: About "d" attribute

From: Rick <graham.rick@gmail.com>
Date: Fri, 11 May 2012 07:03:28 -0400
Message-ID: <CAGDjS3fLbije=UBoFfFCpn68q-eOWXGntJAuNkmt3fAgQJT35w@mail.gmail.com>
To: 向雅 <fyaoxy@gmail.com>
Cc: www-svg@w3.org
On Thu, May 10, 2012 at 9:02 PM, 向雅 <fyaoxy@gmail.com> wrote:

> Hi,
> Just notice this:
> 8.3.9 The grammar for path data
> Note that the BNF allows the path ‘d’ attribute to be empty. This is
> not an error, instead it disables rendering of the path.
> Real strange!
> Reason:
> if d is empty, there is  no path at all. so no render, so disable
> what?  Bad logic?
> Who will write empty path node? Some one eat enough, nothint to do?

People tend to forget that SVG is dynamic.

One could come up with use cases for a path that from time to time has no

A path is a series of segments, and zero segments has properly been
accepted as legal.

You could argue that it should be an error to have a path without
definition and that the proper method would be to use display='none'.  You
could argue that in a static language a path with no nodes this is
nonsensical. SVG is not a static geometry format, it is a dynamic geometry
language.  For a path to have a state with zero nodes is a perfectly valid

> Regards
> Qinxian

*Those who can make you believe absurdities can make you commit atrocities.
 - Voltaire*
Received on Friday, 11 May 2012 11:03:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:34 UTC