On Sunday, March 21, 2010, 1:58:27 PM, Johannes wrote:
JR> Hello,
>> It seems that the test expects this to result in a black line. Can
>> anyone explain why please? The # does not seem to be valid according
>> to http://dev.w3.org/SVG/profiles/1.1F2/publish/paths.html#PathDataBNF,
>> so unless I'm reading it wrong the path is in error and should not be
>> drawn resulting in a red line being shown.
JR> If I'm reading the text below the BNF rules correctly:
JR> “The processing of the BNF must consume as much of a given BNF
JR> production as possible, stopping at the point when a character is
JR> encountered which no longer satisfies the production.”,
JR> then an error in the path data does not cease rendering of the path but
JR> instead tries to recover if possible and still render the path. So for
JR> the test case path data processing should stop when encountering the #
JR> sign but still draw everything that has been encountered until then.
Yes.
Indeed the test description (view source in the SVG file) says
<p>
The 'path' element's 'pathdata' attribute ignores additional whitespace, newline characters, and commas, and BNF processing consumes as much content as possible, stopping as soon as a character that doesn't satisfy the production is encountered.
</p>
<p>
Various black path segments are rendered that each demonstrate one of the parsing rules. Each path segment is placed on top
of a similar path segment that lacks the particular parsing rule that is being tested. Test passes if no red is visible.
</p>
JR> Although the test case then wouldn't show an error condition if a
JR> renderer decides to skip the # and draw the horizontal line up to 90;
JR> perhaps that error would have best been inserted in the red line instead
JR> of the black.
Good point, I have made that change.
I also uncommented the test description and marked the test as reviewed.
--
Chris Lilley mailto:chris@w3.org
Technical Director, Interaction Domain
W3C Graphics Activity Lead
Co-Chair, W3C Hypertext CG