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

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: ''
Subject: Re: Comments on XML Schema that would enable validation of SVG

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

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
>> 38.html and
>> 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
>> 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
>> I'd urge you to consider the benefits of a more complete validation of
>> 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
>> 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 UTC