From: SourceForge.net <no...@so...> - 2006-04-19 09:25:54
|
Bugs item #1368134, was opened at 2005-11-28 12:28 Message generated for change (Comment added) made by dj_dick You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1368134&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: HTML Status: Closed Resolution: None Priority: 5 Submitted By: Richard Gabriel (dj_dick) Assigned to: Jirka Kosek (kosek) Summary: Problem with index in HTML Help output Initial Comment: When trying to create HTML Help with index (i.e. to process a XML file that contains at least one <indexterm> tag), the following errors are reported: --- Writing pr01.html for preface(chap-preface) [...cut...] Writing go01.html for glossary Error index is not a chunk! Writing for index Error at saxon:output on line 300 of file:/E:/Manuals/xsl/styles/html/chunker.xsl: Failed to create output file : (The system cannot find the path specified) Transformation failed: Run-time errors were reported --- Obviously, the stylesheets try tro create a file for an empty chunk name. In htmlhelp/htmlhelp-common.xsl, there is the following parameter defined: <xsl:param name="generate.index" select="0"/> which should turn off creating a chunk for index in case of HTML help. Good idea, but it is not handled correctly. If I set this parameter to "1", all works OK (only an extra chunk file will be generated for the index, which is not used in further... The HTML Help project file is not affected - it won't contain the index chunk file.). Please fix it... Note: Unfortunately, this parameter cannot neither be overriden in my custom stylesheet which imports htmlhelp.xsl... :-( ---------------------------------------------------------------------- >Comment By: Richard Gabriel (dj_dick) Date: 2006-04-19 11:25 Message: Logged In: YES user_id=1168188 Many thanks for the explanation and a fast fix! I've downloaded the recent snapshots and it works well: Empty <index> tag => no index generated Non-empty <index> tag => index file is silently generated, without error or warning messages. P.S. Yes, Kerio uses DocBook + XSLT for HTML and HTML Help output and DocBook + ConTeXt for PDF output. AFAIK Sunbelt does as well. ---------------------------------------------------------------------- Comment By: Jirka Kosek (kosek) Date: 2006-04-19 10:49 Message: Logged In: YES user_id=189932 This is actually not bug in stylesheets. The problem is that your index contains title -- <index><title>Index</title></ index>, whereas you should have only emtpy element <index/>. Empty index element is used to trigger autogeneration of index. Because you have title inside, stylesheets are confused. This is caused by the following template: <xsl:template match="setindex |book/index |article/index |part/index"> <!-- some implementations use completely empty index tags to indicate --> <!-- where an automatically generated index should be inserted. so --> <!-- if the index is completely empty, skip it. --> <xsl:if test="count(*)>0 or $generate.index != '0'"> <xsl:call-template name="process-chunk-element"/> </xsl:if> </xsl:template> from html/chunk-code.xsl. For your document count(*)>0 is always true, because there is title element and chunk will be generated. I corrected stylesheets, so they will not emit error message in your case and just silently generate index page. BTW, glad to see that Kerio (Sunbelt now?) is using DocBook. Are you still using ConTeXt to generate PDFs? ---------------------------------------------------------------------- Comment By: Richard Gabriel (dj_dick) Date: 2006-04-19 10:22 Message: Logged In: YES user_id=1168188 I've attached a sample file and my custom stylesheets. There is a brief description in the "readme.txt" file inside the package. ---------------------------------------------------------------------- Comment By: Jirka Kosek (kosek) Date: 2006-04-18 15:13 Message: Logged In: YES user_id=189932 Yes, please attach test document together with stylesheets customization. ---------------------------------------------------------------------- Comment By: Richard Gabriel (dj_dick) Date: 2006-04-18 15:04 Message: Logged In: YES user_id=1168188 I've upgraded to the latest snapshot (2006-04-15). The error still presists but now it is reported on line 309 of html/chunker.xsl. I've tested it on several XML files in various languages. Should I attach some test files? ---------------------------------------------------------------------- Comment By: Jirka Kosek (kosek) Date: 2006-04-14 21:23 Message: Logged In: YES user_id=189932 Does the problem occur when you process your document with the latest snapshot release from http://docbook.sf.net/ snapshots/ ? I can't reproduce this error with the current stylesheets release. ---------------------------------------------------------------------- Comment By: Richard Gabriel (dj_dick) Date: 2005-11-28 12:50 Message: Logged In: YES user_id=1168188 I'm sorry I've submitted this issue into Feature Requests by a mistake. Could somebody move it into Bugs? THANKS! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1368134&group_id=21935 |