Re: DOCBOOK-APPS: code examples and whitespace

From
Jirka Kosek <>
Date
2002-01-16T15:22:45+00:00
ID
Thread
Re: DOCBOOK-APPS: code examples and whitespace
Nick Bauman wrote:
> 
> Er, anyone else have this problem? When I have a code example, my white
> space is flattened into one line by my XML editor (XMLMind). My how this
> sucks! Kinda undermines the whole point of of a code snippet.

The are possibly two solutions:

1. You can configure your editor to preserve space in programlisting. I
don't know if XMLMind allows this.

2. You can add xml:space="preserve" attribute to programlisting. This
should prevent your editor from mangling white-space. But you then will
be unable validate DocBook document as current DTD doesn't contain this
attribute. I think that this will be fixed in DocBook 4.2, but I'm not
sure.

(3. Of course you can always change your XML editor. My Emacs doesn't
corrupt my documents ;-)

				Jirka

-- 
-----------------------------------------------------------------
  Jirka Kosek  	                     
  e-mail: 
  http://www.kosek.cz