Bugzilla – 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
Last modified: 2011-10-15 14:46:00 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.
"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.
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.
(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.