[libosinfo 0/4]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

In order to support the <foo/> syntax to represent booleans in libosinfo databases,
some changes are needed in the OsinfoLoader parser in order for it to be able to parse
empty nodes when needed (see patch 2/4 for details). These patches do the needed changes,
and adjust the libosinfo database to use the shorter syntax for booleans.
The older syntax is still supported.

An alternative to this patch would be to modify osinfo_loader_string() so that it 
can make the difference between non-existing nodes, and empty ones. Handling booleans through
a new osinfo_loader_boolean() has the advantage that all booleans are stored the same way in
the in-memory OsinfoDb. If we change osinfo_loader_string(), some booleans will be stored as
("foo", "true") while others will be stored as ("foo", "") depending on how they are represented
in the XML.

One last note, the schema change could be improved a little bit, as we have some attributes marked
as booleans. The schema allows for an empty value to mean 'true', so <foo bar=""> will now be accepted
and be the same as <foo bar="true">. We could have 2 'bool' definitions in the schema for nodes and
attributes, but that seemed a bit too much.

Christophe

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux