boostorg / boostorg/property_tree
XML writer / parser does not implement attribute normalization, it is not conformant
- Dominant language
- C++
- Stars
- 65
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
boost::property_tree is able to read the XML attribute values it writes, however it seems to not implement XML attribute normalization:
https://www.w3.org/TR/REC-xml/#AVNormalize
Namely, if a XML attribute value contains newlines or tabs, these newlines or tabs are replaced by libexpat by spaces after parsing and before passing to an application due to the mandatory normalization as shown by the following table from the XML norm:

Please note that an attribute type is considered CDATA by default.
And by the way, none of the XML parsers / writers that I checked (boost serialization, tinyxml, lib3mf) seem to implement normalization.
This issue is similar to https://github.com/3MFConsortium/lib3mf/issues/288
Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named in the report. Start with the XML reader and writer's attribute handling, compare it with the W3C XML AVNormalize rules and libexpat behavior, and verify that attribute values follow the required normalization without breaking existing round trips.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100