Random spaces appearing between elements

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Random spaces appearing between elements

Post by ra0543 »

Since upgrading to Oxygen 12 (I don't think I was getting this in 11) I keep getting random bunches of spaces of varying length, e.g. ' ' or ' ', being inserted within elements and this seems to happen according to no particular pattern of distribution. Every time I delete them and then save and reopen the file, it seems they reappear - not necessarily in the same place. The lengths seems to correspond to the depth of nesting of the relevant elements being separate: it's like Oxygen is adding indents to the text while not adding linebreaks.

The problem is that I work solely in the author view and the elements in question are descendants of an element marked with the xml:space='preserve' attribute. The spaces seem only to be added within elements that have element-only content, and they are added between such child elements. But nonetheless, it is extremely irritating.

I suspect that this is a consequence of sometimes having very long lines in my files - since it seems only to happen on lines that are very long -, but I've tried adjusting the long-line threshold in the options to 30,000 characters (when I discovered the problematic line does exceed the default 15,000 characters) but it still seems to happen even though that new threshold is not exceeded. Moreover, it seems weird that Oxygen's response to any very long line is to try to make it longer.

I thought that Oxygen in all views and actions respects absolutely xml:space='preserve' and never ever interferes with the spaces etc. within them. (In not adding linebreaks, it seems like that is true - but perhaps there is a bug and the indents are incorrectly being put in.) Is this no longer the case? Although the spaces are not meaningful as far as the XML goes, I do need them not to be added in this way, because that has knock-on effects elsewhere.

Is this a bug? And if so, can it be fixed?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Random spaces appearing between elements

Post by george »

Hi,

I tried to reproduce a similar behavior but I was not able to do that. It will be great if you can identify a document, a set of operations and the wrong result and send that either to support at oxygenxml.com or post thhem directly on the forum if you manage to get small samples.

Sure, elements marked as space preserve should not be modified if you edit the document outside those elements.

Best Regards,
George
George Cristian Bina
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Re: Random spaces appearing between elements

Post by ra0543 »

Sure, elements marked as space preserve should not be modified if you edit the document outside those elements.
I thought the whole point of the xml:space marking was that their spacing shouldn't be modified at all ever by the system irrespective of where I happen to be editing. In other words, I can change the spaces if I wish (which I don't), but these elements and their descendants (unless there is an intervening element with the alternative xml:space attribute value) are always and unconditionally entirely exempt from any operations carried out automatically.

Anyway, as requested, I've sent you directly a sample of data before and after together with a description of the problem.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Random spaces appearing between elements

Post by george »

Thanks!
To fix this please go to
Options->Preferences -- Editor / Pages / Author -- Format and Indent, and select "The entire document" instead of "Only the modified content".
It seems the partial serialization done when the Author tries to change only the actually modified control does not take into account the xml:space value.

Best Regards,
George
George Cristian Bina
Post Reply