Page 1 of 1

Format/indent with structured CDATA?

Posted: Mon Aug 18, 2003 9:57 am
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

Posted: Mon Aug 18, 2003 11:47 am
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