Malo Pichot wrote:
> 
> Can anybody explain to me how I can put a simple carriage return
> bewteen to elements ? I'm in a <authorgroup> and I want to go to
> a new line after a <firstname>, before a <email>.

My answer is general because at least in DocBook 4.1.2, an <authorgroup>
(or an <author>) cannot contain an <email>.

You cannot add a newline to an element which has not an
xml:space="preserve" attribute. Without xml:space="preserve", a XML
application such as XXE is free to do whatever it wants with whitespace.
By default (missing xml:space or xml:space="default") XXE strips them.

The DocBook DTD downloaded from oasys never uses the
xml:space="preserve" attribute. We had to patch the 4.1.2 DTD to add
xml:space="preserve" to obvious elements such as programlisting. This is
detailed in
http://www.xmlmind.com/xmleditor/_distrib/docs/user/userguide5.html#id.s5

Note that just doing this is not sufficient, you'll have to also specify
"white-space: pre;" in the CSS for the corresponding element. For
example, we have added this for programlisting:

programlisting {
    white-space: pre; 
}

If you just want to have a newline before <email> just because it looks
nicer, an easy solution is to just add a rule like this in the DocBook
CSS:

email:before {
    content: "\A";
}

In such case, may be what you really want is that XMLmind adapts the
DocBook CSS to DocBook 4.2?

Reply via email to