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

Re: About "d" attribute

From: 向雅 <fyaoxy@gmail.com>
Date: Fri, 11 May 2012 22:42:36 +0800
Message-ID: <CAJH9WWSbQBg5OM-TzT551sE4ao4NxafOhyMh5qdW0SNFp1a+YA@mail.gmail.com>
To: Rick <graham.rick@gmail.com>
Cc: www-svg@w3.org
Yes, you're right, SVG is dynamic. But the kind of dynamic difference
with "display=none" form.
In common, coder make some details in node, and maybe dynamically
switch display on or off by that way.
But if my path is empty, I can do the only thing, setup its content by
set the "d" attribute.
And what's more, because SVG is dynamic, I can add a full new svg
element dynamically on demand. so the empty path just a placeholder.
somelike a square of dynamic, in other word, dynamic of dynamic:)
Does someone really think a placeholder useful in a dynamic env?


2012/5/11 Rick <graham.rick@gmail.com>:
> 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 14:43:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:28 UTC