Brendon Costa wrote:
>
> I imagine this is a common question. I looked in the FAQ, HOWTO and
> Users Wish List and found nothing.
Not really because other users don't have this problem. See below.
> Just as a note as well, i could not
> find a page to search the archives. I must be blind...
The Search box found at the top of all pages of the
www.xmlmind.com/xmleditor/ ``sub-site'' may be used to search both the
Web ``sub-site'' and the mailing list archives.
> Anyhow, I am trying to add some code to a Dockbook format "book" under
> a "code" section. All looks good, but when I restart XML Mind Editor
> and reload the document all white-space in the code segment is gone. I
> expect this for most other text segments, but I assumed that
> white-space would have been preserved in a code section.
Of course, you are right. The problem is that, in principle, this is
already the case.
Whitespace (including newlines) is preserved in the following DocBook
elements:
---
address
funcsynopsisinfo
classsynopsisinfo
literallayout
programlisting
screen
synopsis
---
However if your DocBook document is structurally invalid (red icon at
the bottom/left of the main window), whitespace cannot be properly
preserved by XXE.
If this is the case, the first thing to do is to fix the structure of
your document.
If this is not the case, do not hesitate to send us the document having
the problem you describe. May be you have found a bug (but I really
doubt this is the case).
> I am sure there is some attribute that can be set or something of the
> like that allows white-space to be preserved. This is my first time
> using DocBook so if someone could point me in the right direction in
> order to preserve white-space in a code element it would be great, or
> a good place to look to find such reference information might be great
> too.
The most common way to preserve whitespace in an element is to add
attribute xml:space with default value "preserve" to the declaration of
this element in the DTD or in the schema.
With DocBook, this is not the case. That's why this is specified in an
XXE configuration file.
Excerpts of XXE_install_dir/addon/config/docbook/common.incl
---
<cfg:preserveSpace xmlns=""
elements="address funcsynopsisinfo classsynopsisinfo
literallayout programlisting screen synopsis" />
---
More info. in
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/preserveSpace.html