Oxygen closes empty tags in Author mode for XHTML files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
docswab
Posts: 2
Joined: Wed Feb 24, 2010 10:56 pm

Oxygen closes empty tags in Author mode for XHTML files

Post by docswab »

We have XHTML files (.html) we want to edit in Oxygen since the Author view rendering and editing mode is quite good now.

However, we can't allow our code to be rewritten. In particular, we have empty <div> and <input> tags that can't be self-closed or the HTML does not function correctly. (That is, <div></div> must be left as such.)

Unfortunately, ANY change to one of these files while in Author view will close these tags. (<div></div> becomes <div/>.) What is the preference setting, Doctype, or namespace in Oxygen Editor edition that will not rewrite any of our markup?

This is the only thing that prevents us from using Oxygen as our HTML editor instead of Dreamweaver.

Here is the doctype and namespace declaration we are using:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen closes empty tags in Author mode for XHTML files

Post by Radu »

Hi,

In the Oxygen Preferences->"Editor / Format / XML" preferences page there is a checkbox called Expand empty elements which you can check. In this way empty elements will always appear in expanded format.
Oxygen 11.1 indeed formats the entire document when saving in the Author page.
Oxygen 11.2 by default will only format the elements which were changed. In this way you will have less differences in the document after editing.

Hope this helps,
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
docswab
Posts: 2
Joined: Wed Feb 24, 2010 10:56 pm

Re: Oxygen closes empty tags in Author mode for XHTML files

Post by docswab »

This is exactly what I was looking for, and somehow in all the times I'd gone through the preferences (there are a lot of them!), I had not understood what that one would do.

Thank you very much. We'll also look forward to 11.2.

Best,
Steve Allison-Bunnell
Simbiotic Software
Post Reply