From: SourceForge.net <no...@so...> - 2007-12-21 15:25:48
|
Bugs item #1847825, was opened at 2007-12-10 13:05 Message generated for change (Settings changed) made by mzjn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1847825&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: print/FO/PDF >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Alexey Elizarov (acsnd) Assigned to: Nobody/Anonymous (nobody) Summary: Xsl-ns, block d:comment, d:remark template does not match Initial Comment: An error found in fo/inline.xsl in the namespaced stylesheets. When examining the problem, the similar error was found in html/inline.xsl. When trying to generate pdf from a docbook with a block-level <remark>, on the stage fo->pdf I get the error message: >[error] Element 'fo:inline' cannot be a child of 'fo:flow'. Only block-level elements are permitted in this context. The error is caused by incorrect entity definition in fo/inline.xsl ($Id: inline.xsl 7440 2007-09-12 17:30:52Z mzjn $): <!DOCTYPE xsl:stylesheet [ <!ENTITY comment.block.parents "parent::answer|parent::appendix|... which is further used in the template: <xsl:template match="d:comment[&comment.block.parents;]|d:remark[&comment.block.parents;]"> The namespace d: is missing. This should be: <!DOCTYPE xsl:stylesheet [ <!ENTITY comment.block.parents "parent::d:answer|parent::d:appendix|... The same error is in the html/inilne.xsl ($Id: inline.xsl 7232 2007-08-11 16:10:40Z mzjn $). Though, in the xhtml/inline.xsl (This file was created automatically by html2xhtml from the HTML stylesheets. $Id: inline.xsl 7232 2007-08-11 16:10:40Z mzjn $) all is correct. There are no entities, and the template definition looks like this: <xsl:template match="d:comment[parent::d:answer|parent::d:appendix|... It might be better not to use entities, but use the xhtml definition. Copying this line from xhtml/inline.xsl to fo/inline.xsl fixes the problem. The html/inline.xsl should also be fixed. Found in docbook-xsl-ns 1.73.2, also in the snapshot revision 7580, on 2007-12-07 at 0105 PST. Tools used: C:\DocBook\libxslt>xsltproc.exe --version Using libxml 20626CVS2823, libxslt 10117CVS1069 and libexslt 813CVS1069 xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813 libxslt 10117 was compiled against libxml 20626 libexslt 813 was compiled against libxml 20626 xep-4.10-20070727-personal Sample document: <?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"> <title>Test</title> <remark>Remark</remark> </article> ---------------------------------------------------------------------- Comment By: Alexey Elizarov (acsnd) Date: 2007-12-20 20:34 Message: Logged In: YES user_id=464574 Originator: YES Tested: xsl-ns. In my case the xsl-ns version now creates correct output for all 3 targets: fo, html, xhtml. The version without namespace is not tested, though, I don't expect it to fail. ---------------------------------------------------------------------- Comment By: Mauritz Jeanson (mzjn) Date: 2007-12-12 21:02 Message: Logged In: YES user_id=582041 Originator: NO There was a bug in the Perl script that converts non-namespaced stylesheets to namespaced stylesheets. The problematic entity is called comment.block.parents, but in the script it was assumed that entity names consist of alphanumeric characters only. ---------------------------------------------------------------------- Comment By: Mauritz Jeanson (mzjn) Date: 2007-12-12 21:02 Message: Logged In: YES user_id=582041 Originator: NO A fix for this issue has been added to the current codebase. Please test the fix with the latest snapshot from: http://docbook.sourceforge.net/snapshots/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1847825&group_id=21935 |