Bug 1022454 - make the generated XML minimal
make the generated XML minimal
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: libcomps (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jindrich Luza
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 06:22 EDT by Ales Kozumplik
Modified: 2014-09-30 19:41 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 07:41:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Kozumplik 2013-10-23 06:22:57 EDT
Description of problem:

libcomps currently writes out attributes of elements even if they're set to their default value, e.g. the <uservisible>. This makes the generated .xml file bigger than necessary which is undesirable if libcomps is ever going to become the library to generate comps files in the Fedora repos.

The DTD for comps should be updated to correctly reflect all the defaults, libcomps should either always generate the minimal XML possible or have a switch that includes/excldudes implicit values.
Comment 1 Jindrich Luza 2013-12-09 07:41:51 EST
xml_options and def_options arguments will be in new version of libcomps.
 - def_options is structure passed to parse_* function telling parser which value will be used in case of missing attribute/element.

 - xml_options is structure indicating how xml output will looks (like explicit containment of some attributes in output, empty groups/categories/environments output etc.)
- def_options used in xml_* functions indicates default values of parser. That means if generated X value is equal default X value in def_options and X_explicit flag in xml_options is false, output of X value will be omitted.

Finaly if neither def_options nor xml_options is passed to parse_* or xml_* functions, default versions of this structures will be used.

Note You need to log in before you can comment on or make changes to this bug.