- $writer->startTag("Style", id => $options{tag});
- $writer->startTag("IconStyle");
- $writer->startTag("Icon");
- $writer->startTag("href");
- $writer->characters($options{icon});
- $writer->endTag();
- $writer->endTag();
- $writer->endTag();
- $writer->endTag();
+ if (!$tags_map{$options{tag}}) {
+ debug("found new style " . $options{tag});
+ $tags_map{$options{tag}} = ();
+ $writer->startTag("Style", id => $options{tag});
+ $writer->startTag("IconStyle");
+ $writer->startTag("Icon");
+ $writer->startTag("href");
+ $writer->characters($options{icon});
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ }
+ $tags_map{$options{tag}}{$name} = \%options;