| 2270 | } |
| 2271 | |
| 2272 | std::string SvgSerializer::nameElement(const IfcUtil::IfcBaseEntity* storey, const IfcGeom::Element* elem) { |
| 2273 | auto n = elem->name(); |
| 2274 | IfcUtil::escape_xml(n); |
| 2275 | |
| 2276 | return nameElement_({ |
| 2277 | {"id", with_section_heights_from_storey_ ? object_id(storey, elem) : GeometrySerializer::object_id(elem)}, |
| 2278 | {"class", elem->type()}, |
| 2279 | {namespace_prefix_ + "name", n}, |
| 2280 | {namespace_prefix_ + "guid", elem->guid()} |
| 2281 | }); |
| 2282 | } |
| 2283 | |
| 2284 | std::string SvgSerializer::idElement(const IfcUtil::IfcBaseEntity* elem) { |
| 2285 | const std::string type = elem->declaration().is("IfcBuildingStorey") ? "storey" : "product"; |