forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [JIRA] Commented: (FOR-345) Accent in toc : broken links
Date Thu, 11 Nov 2004 12:28:38 GMT
The following comment has been added to this issue:

     Author: Ross Gardler
    Created: Thu, 11 Nov 2004 6:28 AM
Linda Rose had a similar problem:

> I have an html source file with links to named anchors. When I convert it using Forrest,
the named anchors seemed to be stripped out, see
and scroll down to the Geographic locations link. It's suppose to link to a named anchor further
down in the file. Is there a better way to create links within a file?

Looking at that the source of that document I see that the link is marked up as:

<strong><a href="#geoloc">Geographic locations</a></strong>

whilst the intended destination of the link is:

<a name="adl%3Ageographic+locations"></a>
<h3 class="underlined_5">adl:geographic locations</h3>

What appears is happening is Forrest is rewriting the anchor name for use in the  table of
contents, thus breaking your original link. This is a bug (probably in html2document.xsl),
please submit it to the issue tracker and if you patch the file please add the patch to the
issue too.


View this comment:

View the issue:

Here is an overview of the issue:
        Key: FOR-345
    Summary: Accent in toc : broken links
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: Forrest
             Core operations

   Reporter: Frédéric Deniger

    Created: Tue, 2 Nov 2004 4:19 AM
    Updated: Thu, 11 Nov 2004 6:28 AM
Environment: Any

I have some problems with the toc. I use accents for my title and the links generated in the
TOC for these titles are broken.

My source code is :

The Toc generated is

|"<a href="#Cass%E9s">Cassé</a>"

This link can't be used.

I found a solution : I modified the file sitmap.xmap (line 90-94)
The initial source is
 |<!-- Generates @id attributes from <title> strings -->
 |      <map:transformer name="idgen" 
 |       <element>//*[local-name() = 'section']</element>
*|        <id>title/text()</id>
 |      </map:transformer>

My change :
 |<!-- Generates @id attributes from <title> strings -->
 |      <map:transformer name="idgen" 
 | src="org.apache.cocoon.transformation.IdGeneratorTransformer">
 |        <element>//*[local-name() = 'section']</element>
*|        <id>generate-id()</id>
 |      </map:transformer>
The changed line begins with '*'. 
This is the simplest workaround I found.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message