Re: DOCBOOK-APPS: xhtml transform problems

From
Jirka Kosek <>
Date
2001-03-18T08:49:52+00:00
ID
Thread
Re: DOCBOOK-APPS: xhtml transform problems
Eric Richardson wrote:

> <orderedlist>
> <listitem>
> <para>As root - format floppy(raw).
> <screen format="linespecific">
> <prompt moreinfo="none">debian:~#</prompt><command moreinfo="none">mount
> /dev/fd0</command>
> <prompt moreinfo="none">debian:~#</prompt><command
> moreinfo="none">umount /dev/fd0</command>
> <prompt moreinfo="none">debian:~#</prompt><command
> moreinfo="none">fdformat /dev/fd0</command>
> </screen>
> </para>
> </listitem>
> </orderedlist>
> 
> This piece of xhtml won't validate as only inline and special block(map,
> applet etc.) are allowed inside of <p> whereas <pre> is block, from what
> I can gather from the DTD and the nsgmls validation error.

DocBook allows elements like screen inside para. Stylesheet only
converts DocBook <para>s to HTML <p>s and <screen>s to <pre>s. If you
want to get correct HTML output, write screens on same level as paras:

<orderedlist>
<listitem>
<para>As root - format floppy(raw).</para>
<screen format="linespecific">
<prompt moreinfo="none">debian:~#</prompt><command moreinfo="none">mount
/dev/fd0</command>
<prompt moreinfo="none">debian:~#</prompt><command
moreinfo="none">umount /dev/fd0</command>
<prompt moreinfo="none">debian:~#</prompt><command
moreinfo="none">fdformat /dev/fd0</command>
</screen>
</listitem>
</orderedlist>

Cleaner solution would be to modify stylesheet to handle your code in
proper way. This is doable in theory, but it would make stylesheet much
more complicated and complex.

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