-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn when invalid attributes are used in XML to construct Symbolizers #110
Comments
[herm] It would also be nice to have at least a warning when an invalid attribute ist used. For example |
[springmeyer] yes, Herm I agree about the attributes. I am going to work on this. so, accepting ticket |
[springmeyer] but as far as the first problem mentioned, it seems fixed now, as with ? and extra / I get: {{{ |
[springmeyer] hmm... http://stackoverflow.com/questions/41453/how-can-i-add-reflection-to-a-c-application |
[springmeyer] okay, impl of this is working, but I need to apply the function to check each part of the map which will take some time, so attaching patch so far for what I have, then will finish up next week. |
[springmeyer] running this on one of the maps in the test suite reveals old usage of 'bgcolor' where mapnik2 only understands 'background-color', so this patch is already helping validate current xml in the test suite. will need to give though about whether to have a setting that might throw... {{{ warning attribute 'bgcolor' is not valid, acceptable keys are: 'background-color,background-image,srs,buffer_size,paths_from_xml,minimum_version'}}} |
[springmeyer] done in r2582 |
Mapnik's XML parsing (in trunk/Mapnik2) recently switched to using all attributes for symbolizers (for Line/Pattern/Raster, etc like Pattern/Text symbolizers always did), but this means it is easy to make a typo of a property name without knowing. We should throw a warning, and perhaps in strict mode throw an error.
The text was updated successfully, but these errors were encountered: