Boost logo

Boost :

Subject: [boost] [property_tree] Still no support for space
From: Preston A. Elder (prez_at_[hidden])
Date: 2009-09-01 20:13:49


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>&#32;</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>&#32;</field> and <field>] </field> examples above work. No
adjustment either of these settings will make <field> </field> work.

PreZ


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk