Page 1 of 1

Tags to not format

Posted: Wed Jul 23, 2003 8:32 pm
by neilhart
When I format my XML docbook doc in the Eclipse plugin there are parts I don't want their format changed like:

<programlisting>

/**
* //class javadoc
* $Author$, $Revision$, $Date$
* <!--
* $Log$
* -->
**/

</programlisting>

Can anything be done for this?

Posted: Thu Jul 24, 2003 12:55 am
by george
Hi,

Oxygen handles xml:space attribute but the Docbook DTD does not allow xml:space. There is a RFE here that request this addition to Docbook DTD.

What you can do is to put the content in a CDATA section like below:

Code: Select all


            <programlisting><![CDATA[   
/**
* //class javadoc
* $Author$, $Revision$, $Date$
* <!--
* $Log$
* -->
**/
]]></programlisting>
and it will be left unchanged by the pretty print operation.

On the desktop version there is also a light indenting option that just indent tags on the same line, probably that will be offered soon also in the Eclipse plugin version.

Best Regards,
George