NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 863 - The coords attribute of area elements of shape poly are reported as not having an even number of comma-separated integers when they do
The coords attribute of area elements of shape poly are reported as not havin...
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-14 18:49 CEST by Adam Sjøgren
Modified: 2011-10-15 14:46 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Sjøgren 2011-10-14 18:49:56 CEST
Putting this example into validator.nu:

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p>
<map name="testmap">
  <area shape="poly" href="http://localhost/" coords="1,1 2,2 3,3 4,4 5,5 6,6" alt="testarea">
</map>
</p>
</body>
</html>

Yields this error:

Error: Bad value 1,1 2,2 3,3 4,4 5,5 6,6 for attribute coords on element area: A polyline must have an even number of comma-separated integers.

But there is an even number of comma-separated integers?! (Either 6 or 12, depending on how you want to count.)

This example is a minimal one - I hit the snag on a image map generated by graphviz originally.
Comment 1 Michael[tm] Smith 2011-10-15 12:38:57 CEST
"1,1 2,2 3,3 4,4 5,5 6,6" isn't an even number of comma-separated integers. It's actually not even a list of integers -- it's a list of seven comma-separated tokens, with the first token being "1", the second one being "1 2", the third being "2 3", etc. So "1 2" and "2 3" and so on are not integers -- they are tokens that have an integer, then a space, then another integer.

If you want to specify a six-sided polygon, you actually need to specify 12 integers; e.g., coords="5,0,1,5,1,7,5,9,8,7,8,5". The coordinates that are treated as pairs in that are "5,0", then "5,1", then "7,5", and so on.
Comment 2 Adam Sjøgren 2011-10-15 14:24:08 CEST
Ah, I see, graphviz is failing to include commas between the pairs of coordinates.

I simply assumed that the output wasn't wrong because it worked, which was of course a premature jump to a wrong conclusion.

Thanks for the explanation - I will go and try to file a bug in the correct place.
Comment 3 Adam Sjøgren 2011-10-15 14:46:00 CEST
(In reply to comment #2)

> Thanks for the explanation - I will go and try to file a bug in the correct
> place.

I have done so now:

http://www.graphviz.org/mantisbt/view.php?id=2145

Thanks for validator.nu and sorry for the noise.