Indent and Format / elements breaking

Oxygen general issues.
reed
Posts: 2
Joined: Wed Mar 05, 2008 8:30 pm

Indent and Format / elements breaking

Post by reed »

Hello,

I'm new to the forum, and fairly new to Oxygen. I work on large book XML files with huge paragraphs, but of course I'm addicted to pretty print.

I don't want hard returns in my paragraphs, and I want my paragraphs to adjust to the window width, so I use line wrap, even though I miss folding (I see in other threads that this may be addressed).

I indent with tabs, and preserve text as it is. This mostly works, except for instances like this:

Code: Select all

<textMatter>
<div1 id="acprof-9780195329056-div1-23">
<p fullOut="Y"
>Although it is difficult to evaluate
where the element is broken and the greater than sign is knocked to the next line and indented. This shouldn't hamper anything I'm doing, but I have to admit that it just really bugs me. Am I missing something here? Or is this a 'feature' that I have to live with?

Thanks,
Reed
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Indent and Format / elements breaking

Post by sorin_ristache »

Hello,
reed wrote:the element is broken and the greater than sign is knocked to the next line and indented. This shouldn't hamper anything I'm doing, but I have to admit that it just really bugs me. Am I missing something here? Or is this a 'feature' that I have to live with?
The '>' character is kept together with the text because you have no whitespace at the beginning of the text and you have the option Preserve text as it is enabled. When the maximum line width set in the option Line width - Format and Indent is exceeded the line will be wrapped but the text must be preserved.

Regards,
Sorin
reed
Posts: 2
Joined: Wed Mar 05, 2008 8:30 pm

Re: Indent and Format / elements breaking

Post by reed »

Hi Sorin, thanks for you response.

I mostly understand. The closing tag shouldn't be part of text, in my opinion, so I don't see why the preserve text as it is option would treat it as such.

Since we ensure that no text block begins or ends with a space, this will happen more often than I like. It shouldn't mess with anything we do to the XML, but when visually scanning it can be annoying.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Indent and Format / elements breaking

Post by sorin_ristache »

reed wrote:The closing tag shouldn't be part of text, in my opinion, so I don't see why the preserve text as it is option would treat it as such.
The option Preserve text as it is must not insert whitespace characters when you run the pretty print operation so the end tag must remain in the same position with regard to the text that precedes it. Otherwise the text between the start tag and the end tag is not preserved.


Regards,
Sorin
Post Reply