[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Two issues on JavaHelp
Hi! I just ran into two things that might be considered as a bug (or at least some kind of inconvenience). I've tried this on the XSL stylesheets 1.67.2 without any customizations. When transforming a (valid) docbook <book> with a structure like this: <book> <part> <chapter> <refentry> <refnamediv> <refname>abcd</refname> <refpurpose>wxyz</refpurpose> </refnamediv> ... </refentry> <refentry> ... you end up with a messy jhelptoc.xml and jhelpmap.jhm: For the first refentry a tocitem (resp. mapID) is created. That element should have the refname as its content but instead it is filled with the content of every following refentry. I found out that line 198 of profile-javahelp.xsl has an apply-templates <xsl:apply-templates select="preface|chapter|appendix|refentry|section|sect1" mode="jhtoc"/> but the appropriate template for refentry is missing. Copying the one for "section" and renaming it to "refentry" (for both modes "jhtoc" and "map") seemed to solve the problem. After fixing this I still was not able to display my helpset and it turned out that in jhelptoc.xml some <tocitem> had linebreaks in their "text" attribute. These resulted from the input xml and I got rid of them by adding a normalize-space() here: <xsl:template match="section" mode="jhtoc"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="title"> <xsl:apply-templates select="." mode="title.markup"/> </xsl:variable> <tocitem target="{$id}"> <xsl:attribute name="text"> <xsl:value-of select="normalize-space($title)"/> </xsl:attribute> <xsl:apply-templates select="section" mode="jhtoc"/> </tocitem> </xsl:template> Maybe someone can check this? Cheers Patrick -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]