apm::package_version::attributes::generate_xml (private)

 apm::package_version::attributes::generate_xml -version_id version_id \
    [ -indentation indentation ]

Defined in packages/acs-tcl/tcl/apm-install-procs.tcl

Return an XML string with the dynamic package version attributes for a certain package version.

Switches:
-version_id
(required)
The id of the package version to generate the attribute XML for.
-indentation
(optional)
A string with whitespace to indent each tag with
Authors:
Peter Marklund
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 apm_generate_package_spec apm_generate_package_spec (public) apm::package_version::attributes::generate_xml apm::package_version::attributes::generate_xml apm_generate_package_spec->apm::package_version::attributes::generate_xml apm::package_version::attributes::get apm::package_version::attributes::get (public) apm::package_version::attributes::generate_xml->apm::package_version::attributes::get apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::generate_xml->apm::package_version::attributes::get_spec

Testcases:
No testcase defined.
Source code:
    set xml_string ""

    array set attributes [apm::package_version::attributes::get  -version_id $version_id  -array attributes]
    set attribute_defs [apm::package_version::attributes::get_spec]
    #
    # Sort the array so that the XML is always in the same order so
    # its stable for CVS.
    #
    foreach attribute_name [lsort [array names attributes]] {
        #
        # Only output tag if its value is nonempty
        #
        if { $attributes($attribute_name) ne "" } {

            set xml_formatter generate_xml_element
            if {[dict exists $attribute_defs $attribute_name xml_formatter]} {
                set xml_formatter [dict get $attribute_defs $attribute_name xml_formatter]
            }

            append xml_string [{*}$xml_formatter  -indentation $indentation -element_name $attribute_name  -value $attributes($attribute_name)]
        }
    }

    return $xml_string
Generic XQL file:
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: