[property_tree] Still no support for space

I noticed property_tree just got updated in the SVN repository. As per my previous email, RapidXML was upgraded from 1.0 -> 1.13. All well and good. This did fix problems with whitespace handling in previous versions - or more correctly, it split the functionality so it was controlled by 2 different flags. However, in addition to this, the flags passed to RapidXML have changed. Specifically, now the flags parse_normalize_whitespace and parse_trim_whitespace are both passed to RapidXML. And there is no way to disable this. In fact, there is no way to adjust space parsing at all in property_tree. The reason this is of concern to me is this. There is no way to get this to work: <field> <field> or <field>] <field> or <field> </field> None of which will output the space in the result. RapidXML doesn't parse an XSL file, nor does it understand xml:space. So even the following will not work: <field xml:space="preserve"> </field> or <field xml:space="preserve">] </field> In short, could you PLEASE adjust the RapidXML (which is still the default XML parser) options not to mangle the living heck out of all spaces, or provide the ability for the user to specify the behavior they want (like you do with comments). I should also mention that RapidXML defaults both parse_normalize_whitespace and parse_trim_whitespace to off. I did my own testing, adjusting the flags to RapidXML. If I leave parse_normalize_whitespace ON, but turning off parse_trim_whitespace, the <field> </field> and <field>] </field> examples above work. No adjustment either of these settings will make <field> </field> work. PreZ

Preston A. Elder wrote:
I noticed property_tree just got updated in the SVN repository. As per my previous email, RapidXML was upgraded from 1.0 -> 1.13.
All well and good. This did fix problems with whitespace handling in previous versions - or more correctly, it split the functionality so it was controlled by 2 different flags.
However, in addition to this, the flags passed to RapidXML have changed. Specifically, now the flags parse_normalize_whitespace and parse_trim_whitespace are both passed to RapidXML. And there is no way to disable this. In fact, there is no way to adjust space parsing at all in property_tree.
The reason this is of concern to me is this. There is no way to get this to work: <field> <field> or <field>] <field> or <field> </field>
Hi, I'm aware of the issue, and even tried the whitespace preserving method. I've used the flags to make things work the same way as the old version for now, because preserving whitespace made XML round-tripping fail - probably because of the pretty-printing in the output. I have to investigate this further and will give the space-preserving option (and probably make it the default) as soon as I can. For now, however, I wanted to get my work on the trunk so that I get test results from the automated testers. Sebastian
participants (2)
-
Preston A. Elder
-
Sebastian Redl