Dr. Martin Goik wrote: > Consider the following Docbook 5 instance: > > <?xml version="1.0" encoding="UTF-8"?> > <article version="5.0" xmlns="http://docbook.org/ns/docbook" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:svg="http://www.w3.org/2000/svg" > xmlns:m="http://www.w3.org/1998/Math/MathML" > xmlns:html="http://www.w3.org/1999/xhtml" > xmlns:db="http://docbook.org/ns/docbook"> > <info> > <title>Test</title> > </info> > > <section> > <title>Program listing in tables</title> > > <informaltable border="1"> > <tr> > <td><programlisting>#!/bin/ sh > echo "bingo"</programlisting></td> > </tr> > </informaltable> > </section> > </article> > > This file may be loaded in XMLmind as a valid document without problems > and achieves the expected generated HTML/PDF output. But it seems to be > impossible to use XMLmind for creating a <programlisting> inside a HTML > style Docbook5 table cell. > > The screenshot http://www.hdm-stuttgart.de/~goik/insert.png shows my > attempt to insert a "programlisting" into the first <td> cell of the > second table. It also shows that I might choose e.g. "productname" as > child but not programlisting from the alphabetically sorted list. >
In such case, please click in the element of interest (td) and press Shift-F1 (Help|Show Content Model) and you'll see that the contents model of td is something like: --- (text | inlinemediaobject | remark | superscript | subscript | ...| errortext | errorname | errortype)+ | (itemizedlist | orderedlist | procedure | simplelist | variablelist | ... | programlisting | ... | para | formalpara | simpara | annotation)* --- That is, a mix of text and ``inline elements'' OR zero or more ``block elements''. See also http://www.docbook.org/tdg5/en/html/html.td.html Thus, you need to [1] explicitly select the text node contained in the td [2] *replace* (not insert) the selected text node by a programlisting.

