Boost logo

Boost :

Subject: Re: [boost] [property_tree] RapidXML needs updating
From: Preston A. Elder (prez_at_[hidden])
Date: 2009-07-28 18:24:17

Dmitry Vinogradov wrote:
>> If I have something like:
>> <field>&#x20;</field>
> I think this is the right behaviour.

I do not. As far as I know, &#xNN; and &#NNN; is supposed to be treated
literally, and inserted as such. For example, even this should work:
    <field>&#x20; &#x20;</field>
And should result in 3 spaces, without any special attributes required.

And I'm a little bolstered in this opinion by the fact that between 1.0
and 1.13 of RapidXML the behavior changed to match my expectation ;)

> BTW, if you want to get <field> with one space inside, you should write:
> <field xml:space="preserve"> </field>
> or
> <field xml:space="preserve">&#x20;</field>

The space preservation only happens when you already HAVE a non-space
character in the data, for example:
    <field xml:space="preserve">] </field>
works, because of the ']', but just:
    <field xml:space="preserve"> </field>
does not. And as I said before, if &#x20; is being treated as if it
were some character that should be treated literally in this case.

As an aside, with RapidXML v1.0, the second case above, NEITHER your
second case:
    <field xml:space="preserve">&#x20;</field>
works, NOR does the first of my cases above, namely:
    <field xml:space="preserve">] </field>

Yeilding '' and ']' respectively. In 1.13, both work properly (yeilding
' ' ad '] ' respectively).

So I return to my original point, something got fixed between 1.0 and
1.13, and it should be used in boost :)

PreZ :)

Boost list run by bdawes at, gregod at, cpdaniel at, john at