On Wed, Nov 06, 2013 at 02:41:51PM +0100, Christophe Fergeau wrote: > When using 'string(./foo)' as an XPath query, if foo does not exist, an > empty string ("") will be returned. Thus osinfo_loader_string() ignores > empty strings during parsing. This happens during regular parsing as we try > to lookup string(./foo[lang(XX-xx)]) for localized nodes, and ignore its > result if the XPath query returns "" > > However, we want to represent booleans as <foo/>. Boolean values are > currently parsed using osinfo_loader_string(), which means such nodes will > be ignored. By associating type information to the additional keys we want > osinfo_loader_entity() to parse, we'll be able to indicate which values are > booleans, and to parse them accordingly. > --- > osinfo/osinfo_loader.c | 180 ++++++++++++++++++++++++++++--------------------- > 1 file changed, 103 insertions(+), 77 deletions(-) ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo