W3C home > Mailing lists > Public > www-svg@w3.org > July 1999

Re: mandatory "d" attribute on <path>

From: Chris Lilley <chris@w3.org>
Date: Thu, 29 Jul 1999 01:57:06 +0200
Message-ID: <379F98D2.CBF34BB3@w3.org>
To: Ben Hutchings <benh@lsl.co.uk>
CC: www-svg@w3.org


Ben Hutchings wrote:
> 
> I am curious as to why the "d" attribute is mandatory for <path>.  If I
> want to output an arbitrarily long path, I have to be able to output
> child <data> elements.  However, because the "d" attribute is
> mandatory, I also have to put some path data (or maybe just an empty
> string) on the parent <path> element.  This seems very ugly.

Right. The problem is, that for the common case where the path data is
on the d attribute of the path element itself, if we made it optional,
then the parser could not detect that there was no path data. XML DTDs
do not allow one to express constraints of the form "there must be a d
attribute, unless there is at least one data child with a d attribute".

The other option would be to *never* allow d on path and always require
the data element to be used. But that also seems ugly.

All this arises because of the 1023-character restriction on the length
of a d attribute value; it s not clear whether this limit actually helps
either legibility or processing with some XML-aware tools such as Perl.

The SVG WG is however already looking at this issue, so keep an eye out
for the next public draft and let us know if you think it is an
improvement in this area.

--
Chris
Received on Wednesday, 28 July 1999 19:57:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:46 GMT