[ 
https://issues.apache.org/jira/browse/FOR-858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495187
 ] 

Ross Gardler commented on FOR-858:
----------------------------------

Well, I'm working from memory. I wrote this code about 2 years ago for a 
specific project and have not used it since. In other words, my guess is only 
marginally better than yours since I am reverse engineering this too (the 
problem with commercial projects is they don't always pay you to write 
documentation - they pay someone else to do that and then you don't own the 
copyright on the docs :-(

Originally this code was against Forrest 0.5 so this ia a couple of iterations 
before we had plugins. What this means is that it made sense for one extension 
(glossary) to build upon another (the citations). So lets proceed with the 
assumption that both plugins are present.

Looking at the XSL for the cite attribute in the glossary samples we see:

<xsl:if test="@cite">
        (Source: <link role="citation">
      <xsl:attribute name="href">
        <xsl:value-of select="@cite"/>
      </xsl:attribute>
      <xsl:value-of select="@cite"/></link>)
</xsl:if>

In other words, a glossary entry can contain a citation as an attribute. 
However, this depends on the existence of the citations plugin, which should 
provide support for <link role="citation">...</link>

However, looking at the citations plugin I see that the support for this type 
of link is not included. I'll need to dig out my old code bases (no idea if I 
still have it, will look when I get the time).

Alternatively it would be pretty easy to add this functionality back in. What 
needs to happen is to preprocess elements with @role="citation" to rewrite  the 
@href to point to the correct entry in the citation.xml file.

(note in my original work there was also a <link role="glossary" 
href="GLOSSARY_ENTRY_ID"> element that was handled in the same way).

----

Maybe the subject of this issue needs to change to reflect this new direction.

> glossary items with "see" for other items creates broken links
> --------------------------------------------------------------
>
>                 Key: FOR-858
>                 URL: https://issues.apache.org/jira/browse/FOR-858
>             Project: Forrest
>          Issue Type: Bug
>          Components: Plugin: input.glossary
>    Affects Versions: 0.8
>            Reporter: David Crossley
>
> The glossary-to-document.xsl handles the "see" elements to create links to 
> other items. However this broken and so is commented-out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.