public static Style CreateStyle(StyleInfo style, Defaults defaults) { Style tmp = new Style(); tmp.Name = style.Name; tmp.Type = style.Type; tmp.Value = style.Value; if (style.Value.Equals("")) { String generated = GenerateValue(style); if (generated == null || generated.Equals("")) generated = defaults.GetDefaultStyleValue(style); tmp.Value = generated; } return tmp; }