Format/indent with structured CDATA?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ridesmet

Format/indent with structured CDATA?

Post by ridesmet »

Hello,

I acquired a 30 day license to evaluate oXygen XML editor. So far, everything works marvelous. I only have the following annoyance. Format/indent works except for CDATA content that is to be interpreted with its structure. For example, I am using a lot of <programlisting> tags in Docbook 4.2 documents and the content between these tags has some layout like new lines and spaced indents. Is there any way to tell oXygen to skip this tag (and alike) from formatting?

I am using the plugin version of oXygen on:
- Windows 2000 with Eclipse 2.1.1
- MacOS X 10.2.6 with Eclipse 3.0 M1

Ringo
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

The current solution is to use a CDATA section to mark the programlisting content, something like:

Code: Select all


<programlisting><![CDATA[
your program listing here...

]]>
</programlisting>
An alternative is to use xml:space="preserve" attribute on the programlisting element but unfortunatelly Docbook does not support this attribute and you will get validation errors. There is a feature request for Docbook with exactly this enhancement, see it here.

We have an enhancement entry on our bugzilla to allow the user to configure a set of elements whose spaces should be preserved on pretty print.

Best Regards,
George
Post Reply