+ // Final step: prepend the CSS style.
+ std::string attr_str = attr.str();
+ if (is_xhtml_table) {
+ const std::vector<std::string> styles = computeCssStylePerCell(row, c, cell);
+
+ std::string attr_str_prefix = "style='" + style.str();
+ if (!styles.empty())
+ attr_str_prefix += "; ";
+ for (auto it = styles.begin(); it != styles.end(); ++it) {
+ attr_str_prefix += *it;
+ if (it != styles.end() - 1)
+ attr_str_prefix += "; ";
+ }
+ attr_str_prefix += "' ";
+
+ attr_str.insert(0, attr_str_prefix);
+ }
+