Re: SVG and proper XML design

On Monday 2007-04-09 16:58 -0700, Bill Dwyer wrote:
> <path>
>  <moveto point="1,2"/>
>  <lineto point="1,2"/>
>  <bezier order="2" points="1,2 3,4 5,6"/>
>  <closepath/>
> </path>
> 
>  Naturally, this is much easier to parse using standard XML tools as
> well as simple string tokenizers.

Is the implementation required to report an error if one of these
elements has extra children?  Does whitespace only count as
children?  What if one has extra attributes?  Are other path
elements followed following the closepath element?  What attributes
are allowed on the path element?  How is a path element with no
children treated?

My point is that there are just as many constraints to check whether
you're checking those constraints in a string or in a tree, and you
still have to get the data out, into a usable form, whether you're
getting them out of a string or a tree.  Strings might help a bit if
you don't care about things like interoperable error handling, but
that's not the case for the Web.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Tuesday, 10 April 2007 04:43:26 UTC