After posting to the discussion forum about it (probably the wrong place) I've made the changes to the code that IMHO make the documentation correct :-).
I've changes SkipWhiteSpace and IsWhiteSpace so they switch on condenseWhiteSpace for most cases but attribute parsing, also changed isspace() instances to IsWhiteSpace where possible. The following behavoiur results when parsing and subsequently serialising through an ostream:
on re-reading the documentation I have probably been too hasty - my changes don't make it correct at all :-(.
What they *do* do is to turn condenseWhiteSpace
into a kind of is-html flag. That's just my oppinion of the most sensible behaviour, but perhaps another flag is needed to cover the 3 types of whitespace removal.
Sorry...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
After posting to the discussion forum about it (probably the wrong place) I've made the changes to the code that IMHO make the documentation correct :-).
I've changes SkipWhiteSpace and IsWhiteSpace so they switch on condenseWhiteSpace for most cases but attribute parsing, also changed isspace() instances to IsWhiteSpace where possible. The following behavoiur results when parsing and subsequently serialising through an ostream:
condenseWhiteSpace == true:
<a>___this__text__</a>
becomes:
<a>this_text</a>
<b>_<a>___this__</a>_</b>
becomes:
<b><a>this</a></b>
etc... basically as before but when:
condenseWhiteSpace == false:
<a>___this__text__</a>
becomes:
<a>___this__text__</a>
<b>_<a>___this__</a>_</b>
becomes:
<b>_<a>___this__</a>_</b>
Only the attributes will change, ie
<this attr=myattr/>
becomes:
<this attr="myattr"/>
Which I think is as before. I can try to make up a patch if anyone's interested.
cheers,
-Simon.
Ooops. The attributes haven't come out right I meant:
<this___attr=myattr/>
becomes:
<this_attr="myattr"/>
on re-reading the documentation I have probably been too hasty - my changes don't make it correct at all :-(.
What they *do* do is to turn condenseWhiteSpace
into a kind of is-html flag. That's just my oppinion of the most sensible behaviour, but perhaps another flag is needed to cover the 3 types of whitespace removal.
Sorry...