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

RE: Comments on XML Schema that would enable validation of SVG paths

From: Hundiak, Arthur <ahundiak@ingr.com>
Date: Sun, 12 Dec 1999 12:07:09 -0600
Message-ID: <0E06EC70934FD211B574080009EDC528019D0996@HQ9>
To: Jon Ferraiolo <jferraio@Adobe.COM>, "Arnold, Curt" <Curt.Arnold@hyprotech.com>
Cc: "'www-svg@w3.org'" <www-svg@w3.org>
Sounds like yet another reason to break up the svg path attribute into
individual elements.  Oh well, maybe for svg II.

-----Original Message-----
From: Jon Ferraiolo [mailto:jferraio@Adobe.COM]
Sent: Friday, December 10, 1999 8:01 PM
To: Arnold, Curt
Cc: 'www-svg@w3.org'
Subject: Re: Comments on XML Schema that would enable validation of SVG
paths


Curt,
I don't know enough about current status with XML Schema to have an opinion
on whether XML Schema should have the power to parse lists of values within
attributes. But I would point out that validating an SVG path data string
through XML Schema seems like a difficult exercise for an implementation
that isn't SVG-specific. 

SVG's path data has a rather complicated BNF. Anything that attempts to
validate SVG path data basically would need to have a complete BNF
validation capability, which almost means that the tool would be able to
parse almost any language, not just XML. In the specific case of SVG, there
is a special grammar rule which says that each token is greedy -- it
consumes as much of the stream as it can and still match the formulation
for the rule. This greedy rule would also have to be accommodated by XML
Schema.

But even if XML Schema could parse the SVG path data, there are many other
things you would need to do to intelligently determine whether a given SVG
file was correct.

So, I think XML Schema should not worry about piercing into any of SVG's
attributes for the time being.

Jon Ferraiolo
Adobe Systems Incorporated
SVG Editor


At 11:02 AM 12/9/99 -0700, Arnold, Curt wrote:
>
>> I've posted two comments
>>
(http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/00
>> 38.html and
>>
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/003
>> 9.html) on the XML Schema comments mailing list when combined would allow
>> schema compliant parsers to validate the path data attributes (among many
>> other constructs).  
>> 
>> That is that the parser would be able to detect that
>> 
>> <path d="M 100 100 L 140 100 L 120 140 z"/> 
>> 
>> is valid and
>> 
>> <path d="M 100 L 140 100 L 120 140 z"/> 
>> 
>> is invalid.
>> 
>> However, this requires that the schema workgroup support the concept of a
>> list datatype or qualifer which the working group has rejected as outside
>> of their goals for the first public release (see
>>
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/001
>> 5.html).  However, the concept of list datatypes appears not only in SVG,
>> but also appears in XSLT and in XML 1.0.  The lists in XML 1.0 are
>> supported by "special" legacy types IDREFS and NMTOKENS.  Having a
>> generalized support for list seems more simple than supporting IDREFS and
>> NMTOKENS but discouraging their use.  I believe that the proposals in the
>> comments are reasonable, generally useful and easy to implement.
>> 
>> In the spirit of Tim Berners-Lee "Schemas coming of age" message
>> http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Nov-1999/0247.html),
>> I'd urge you to consider the benefits of a more complete validation of
SVG
>> and work across the group boundaries to get it fixed.
>> 
>> At the present time, the Schema group is under deadline to produce the
>> next public draft (due December 16th).  After that document is released
>> (or based on interim versions that you may have), I'd suggest that a
group
>> attempt to craft an XML Schema for SVG and strongly lobby for appropriate
>> enhancements that would greatly improved the effectiveness of schema
>> validation.
> 
Received on Sunday, 12 December 1999 13:07:16 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:18 GMT