Re: About "d" attribute

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
geometry.

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
concept.


>
> 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