docbook / xslTNG

DocBook xslTNG Stylesheets
https://xsltng.docbook.org
MIT License
42 stars 22 forks source link

para/programlisting generates p/div #319

Closed tgraham-antenna closed 1 year ago

tgraham-antenna commented 1 year ago

div is allowed where flow content is expected, but p expects only phrasing content.

Oxygen generates an error because the div is not allowed there, and Antenna House Formatter treats the <div> as closing the containing p then complains about the dangling </p> after the </div>.

ndw commented 1 year ago

If you're of a mind to put block content in paragraphs (perfectly valid in DocBook and frustratingly invalid in HTML), enable the $unwrap-paragraphs parameter.

tgraham-antenna commented 1 year ago

$unwrap-paragraphs works, thank you.

tgraham-antenna commented 1 year ago

Sorry, but it made a programlisting disappear:

        <para>To save from having to configure the XSL formatter to use the fonts, the XSL-FO uses an AH Formatter extension for declaring local fonts inside <code>fo:declarations</code>:<programlisting language="xml"><![CDATA[<!-- https://github.com/liberationfonts/liberation-fonts/releases -->
<axf:font-face
    src="url('{$muk-xsl.dir}/liberation-fonts-ttf-2.00.5/LiberationSans-Regular.ttf')"
    font-family="Liberation Sans" />
<axf:font-face
    src="url('{$muk-xsl.dir}/liberation-fonts-ttf-2.00.5/LiberationSans-Bold.ttf')"
    font-family="Liberation Sans"
    font-weight="bold" />]]></programlisting></para>
tgraham-antenna commented 1 year ago

XSpec reference file not committed:

  FODC0002  I/O error reported by XML parser processing
  file:/projects/other/xslTNG/src/test/resources/expected/para.004.html. Caused by
  java.io.FileNotFoundException:
  \projects\other\xslTNG\src\test\resources\expected\para.004.html (The system cannot find
  the file specified)
ndw commented 1 year ago

How did that get past CI?

ndw commented 1 year ago

I thinks this is (re)fixed.