This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 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: jirka@kosek.cz
  http://www.kosek.cz

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]