template.responsive icon indicating copy to clipboard operation
template.responsive copied to clipboard

API links failing for classes inside a namespace

Open mAsT3RpEE opened this issue 12 years ago • 0 comments

The api functionality fails for api objects/functions inside a namespace:

Heres a docblock for a class:

namespace BLW;

/**
*   Core blw object.
*   
*   <p>All objects must either implement its instance or extend
*   this class.</p>
*   
*   <hr>
*   
*   @package BLW\Core
*   @api BLW
*   @version 1.0.0
*   @since 0.1.0
*   @author mAsT3RpEE <[email protected]>
*/

This produces a link with href classes/Object.html instead of classes/BLW.Object.html

I fixed the problem by changing index.xsl:

<li><a href="classes/{$name}.html" title="{docblock/description}"><xsl:value-of select="name" /></a></li>

To:

<xsl:variable name="link">
    <xsl:call-template name="createLink">
        <xsl:with-param name="value" select="full_name"/>
    </xsl:call-template>
</xsl:variable>
<li><a href="classes/{substring($link, 2)}.html" title="{docblock/description}"><xsl:value-of select="name" /></a></li>

And:

<li><a href="classes/{$name}.html#{name}" title="{docblock/description}"><xsl:value-of select="../name" />.<xsl:value-of select="name" /></a></li>

To:

<xsl:variable name="link">
    <xsl:call-template name="createLink">
        <xsl:with-param name="value" select="../full_name"/>
    </xsl:call-template>
</xsl:variable>
<li><a href="classes/{substring($link, 2)}.html#{name}" title="{docblock/description}"><xsl:value-of select="../name" />.<xsl:value-of select="name" /></a></li>

mAsT3RpEE avatar Nov 16 '13 08:11 mAsT3RpEE