Re: About "d" attribute

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