XML (DocBook 5) -> HTML (w/ CSS) -> PDF
Posted: Fri Sep 29, 2023 8:09 pm
I have a content library stored in DocBook 5 xml, and I'm using Oxygen XML Editor to apply transformation scenarios. I have a long history with HTML & CSS, and the XML->HTML custom transformation scenario is working well (i.e., the resulting HTML document looks the way I want, and has the content I want).
However, when I edit the transformation scenario and enable "Perform FO Processing" on the "FO Processor" tab (Input: XSLT result as input; Method: pdf; Processor: Apache FOP), I get the following error:
The resulting html file has "<!DOCTYPE HTML>" at the beginning of the document (before the opening <html> tag). I've tried preventing this by adding the following to my XSL file:
But the DOCTYPE declaration persists. I've also edited my fop.xconf to include:
But that similarly has no effect on the outcome (i.e., still getting the same error). Thoughts and suggestions are appreciated.
However, when I edit the transformation scenario and enable "Perform FO Processing" on the "FO Processor" tab (Input: XSLT result as input; Method: pdf; Processor: Apache FOP), I get the following error:
Code: Select all
DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
Code: Select all
<xsl:stylesheet>
<xsl:output method='html' omit-xml-declaration='yes' indent='yes' doctype-public='' doctype-system=''/>
</xsl:stylesheet>
Code: Select all
<useragent>
<!-- Set features for the XML parser -->
<parser>
<features>
<!-- Allow DOCTYPE declarations -->
<feature name="http://apache.org/xml/features/disallow-doctype-decl" value="false"/>
</features>
</parser>
</useragent>