# # # build_xml_overview() # # # This builds the an overview xml table element from the raw report element # for overview and sessions_overview. # # include "templates.util.display_format_type_to_unit"; include "templates.util.xml_util"; subroutine(build_xml_overview( node raw_report_element, node html_formatting, string report_element_type), ( debug_message("\n\n#### build_xml_overview() \n\n"); bool is_sessions_overview = (report_element_type eq "sessions_overview"); node row; node row_items = raw_report_element{"rows"}; string report_field_name; string type; string display_format_type; string unit; string the_value; string label; '\n'; # # table header # '\n'; '\n'; foreach row row_items ( label = get_expanded_label(@row{"label"}); report_field_name = if (!is_sessions_overview) then (@row{"report_field_name"}) else (@row{"field_name"}); type = @row{"table_field_type"}; display_format_type = @row{"display_format_type"}; unit = display_format_type_to_unit(display_format_type); # Set type to string if it is not int and not float if (type ne "int" and type ne "float") then ( type = "string"; ); ''; string_to_xml(label); '\n'; ); '\n'; '\n'; # # table body # '\n'; '\n'; foreach row row_items ( report_field_name = if (!is_sessions_overview) then (@row{"report_field_name"}) else (@row{"field_name"}); # table_field_type = @row{"table_field_type"}; # display_format_type = @row{"display_format_type"}; the_value = @row{"the_value"}; # Added report_field_name in overview for convenience only ''; the_value; '\n'; ); '\n'; '\n'; '
\n'; ));