** Description changed: Binary package hint: yelp OS : Ubuntu 9.10 Yelp : 2.28.0 Man page links do not work when there is no character afer the section number in the man file. For example, a man code like this : .Xr ssh 1 produces a Xml like this : <Xr>ssh 1</Xr> so, the XSL transformation "fails" and produce an invalid link as following : ssh() This bug appears when there are no space + another character after the section number in the man file. - I managed to correct it by modifying the man2html.xsl. + I managed to fix it by changing the man2html.xsl. File : man2html.xsl Line : 322 <!-- Cross reference --> <xsl:template match="Xr"> - <xsl:variable name="manpage" select="substring-before(string(.), ' ')"/> - <xsl:variable name="sectiontmp" select="substring-before(substring-after(string(.), ' '), ' ')"/> - <xsl:variable name="extra" select="substring-after(substring-after(string(.), ' '), ' ')"/> - <xsl:choose> - <xsl:when test="$sectiontmp=''"> - <xsl:variable name="section" select="substring-after(string(.), ' ')"/> - <a> - <xsl:attribute name="href"> - <xsl:text>man:</xsl:text> - <xsl:value-of select="$manpage"/> - <xsl:text>(</xsl:text> - <xsl:value-of select="$section"/> - <xsl:text>)</xsl:text> - </xsl:attribute> - <xsl:value-of select="$manpage"/> - <xsl:text>(</xsl:text> - <xsl:value-of select="$section"/> - <xsl:text>)</xsl:text> - </a> - </xsl:when> - <xsl:when test="$sectiontmp!=''"> - <xsl:variable name="section" select="$sectiontmp"/> - <a> - <xsl:attribute name="href"> - <xsl:text>man:</xsl:text> - <xsl:value-of select="$manpage"/> - <xsl:text>(</xsl:text> - <xsl:value-of select="$section"/> - <xsl:text>)</xsl:text> - </xsl:attribute> - <xsl:value-of select="$manpage"/> - <xsl:text>(</xsl:text> - <xsl:value-of select="$section"/> - <xsl:text>)</xsl:text> - </a> - </xsl:when> - </xsl:choose> - <xsl:value-of select="$extra"/> + <xsl:variable name="manpage" select="substring-before(string(.), ' ')"/> + <xsl:variable name="sectiontmp" select="substring-before(substring-after(string(.), ' '), ' ')"/> + <xsl:variable name="extra" select="substring-after(substring-after(string(.), ' '), ' ')"/> + <xsl:choose> + <xsl:when test="$sectiontmp=''"> + <xsl:variable name="section" select="substring-after(string(.), ' ')"/> + <a> + <xsl:attribute name="href"> + <xsl:text>man:</xsl:text> + <xsl:value-of select="$manpage"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$section"/> + <xsl:text>)</xsl:text> + </xsl:attribute> + <xsl:value-of select="$manpage"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$section"/> + <xsl:text>)</xsl:text> + </a> + </xsl:when> + <xsl:when test="$sectiontmp!=''"> + <xsl:variable name="section" select="$sectiontmp"/> + <a> + <xsl:attribute name="href"> + <xsl:text>man:</xsl:text> + <xsl:value-of select="$manpage"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$section"/> + <xsl:text>)</xsl:text> + </xsl:attribute> + <xsl:value-of select="$manpage"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$section"/> + <xsl:text>)</xsl:text> + </a> + </xsl:when> + </xsl:choose> + <xsl:value-of select="$extra"/> </xsl:template> - I did not find another way of duplicate the code. + I did not find another way that duplicate the code.
-- Invalid man links https://bugs.launchpad.net/bugs/544537 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
