Pierrick Brihaye wrote:
> On a related topic, how to insert a carriage return or a tab char in a 
> programlisting in v 2.6 (with default DTDs) ?
> 
> On v. 2.5p2, pressing [enter] inserts a carriage return, but TAB moves 
> to the the next programlisting's sibling.
> 
> On v. 2.6, pressing [enter] splits the current programlisting.

It is currently possible to insert newlines into a programlisting or
literallayout element, we do that all the time here at XMLmind.

The problem comes from the fact that your users insert programlisting or 
literallayout elements *inside* paras, which even if allowed by the DTD, 
is a bad habit.

If instead, they inserted programlisting or literallayout elements 
before or after paras, you wouldn't have noticed any problem.

Of course, this regression will be fixed in V2.6p1.

It is also very easy to fix yourself if you want. In 
XXE_install_dir/config/docbook/common.incl, replace:

---
   <command name="docb.splitOrInsertNewLine">
     <macro trace="false">
       <choice>
        <sequence>
           <command name="selectNode"
                   parameter="ancestorOrSelf[implicitElement] simpara para" />
          <command name="split" />
        </sequence>

         <command name="insertControlChar" parameter="\n" />
       </choice>
     </macro>
   </command>
---

by:

---
   <command name="docb.splitOrInsertNewLine">
     <macro trace="false">
       <choice>
         <command name="insertControlChar" parameter="\n" />

        <sequence>
           <command name="selectNode"
                   parameter="ancestorOrSelf[implicitElement] simpara para" />
          <command name="split" />
        </sequence>
       </choice>
     </macro>
   </command>
---


Reply via email to