Manuel Collado wrote: > Hussein Shafie wrote: > >> ...[snipped]... >> >> The red icon displayed at the bottom left of XXE clearly indicated >> that there was a severe problem with your document and in such case, >> XXE is run in a lenient mode where some elements may loose their types. >> >> That's why, <programlisting>s temporarily lost their >> xml:space="preserve" attribute. (However, after fixing the document, >> without having to restart the editor, XXE automatically reverts to its >> normal, strictly typed, mode.) > > > I've also experience some trouble with this policy. Perhaps a much safer > approach will be to preserve all space when in lenient recover mode. > > This shouldn't hurt anybody, because no information is lost, the normal > editing mode is not disturbed, and the normal space handling will be > restored as soon as the document becames valid.
Good suggestion. We'll try to implement it in a future release (not V2.6p1 which will be released in the next few days). Just note that this will require to reload the document as soon as it is valid to get rid of all the superfluous white space. > IIRC, space is always preserved in XML comments, even in invalid documents. Comments and processing instructions have no ``element type'' and therefore, they are insensitive to validation modes.

