[Boost-bugs] [Boost C++ Libraries] #11092: Boost write_graphml writes non-conformant GraphML for boolean attributes

Subject: [Boost-bugs] [Boost C++ Libraries] #11092: Boost write_graphml writes non-conformant GraphML for boolean attributes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-10 01:05:59


#11092: Boost write_graphml writes non-conformant GraphML for boolean attributes
------------------------------+----------------------
 Reporter: freedesktop@… | Owner: jewillco
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 Boolean attributes are serialized as 0 and 1. They should be written as
 "false" and "true" instead.

 The GraphML spec does not specify what values are acceptable, but
 according to the GraphML primer, "The type of the GraphML-Attribute can be
 either boolean, int, long, float, double, or string. These types are
 defined like the corresponding types in the Java(TM)-Programming
 language.".

 In source code, Java would allow only "true" and "false" for boolean
 values. If we add any representation that Java's Boolean.parseString()
 recognizes, the case wouldn't matter, but "1" still wouldn't parse as
 true.

 Other libraries like NetworkX fail to parse GraphML with boolean
 attributes written by Boost. See also https :// github.com / networkx /
 networkx / pull / 1063.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11092>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC