i noticed this while i'm working on some c++ code to manipulate kml files - google earth seems to create a lot of <Style> blocks which have identical content within a single document. for example, if i add 5 yellow pushpins in a row and then add 5 red pushpins in a row, and then look at the kml file i see two <StyleMap> (i.e. yellow, red) and four <Style> (i.e. yellow_normal, yellow_highlight, red_normal, red_highlight).
however if i add a yellow pushpin, then a red pushpin, and do this four more times, then the kml file contains _ten_ <StyleMap>'s, but most of them are duplicates.
is there a way to collapse identical <Style> and <StyleMap> blocks together? or am i missing something?