You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by is...@cocoondev.org on 2004/11/11 13:28:38 UTC
[JIRA] Commented: (FOR-345) Accent in toc : broken links
The following comment has been added to this issue:
Author: Ross Gardler
Created: Thu, 11 Nov 2004 6:28 AM
Body:
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 http://www.alexandria.ucsb.edu/adl/docs_software/site/devguide/SBD.html 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.
Ross
---------------------------------------------------------------------
View this comment:
http://issues.cocoondev.org//browse/FOR-345?page=comments#action_11798
---------------------------------------------------------------------
View the issue:
http://issues.cocoondev.org//browse/FOR-345
Here is an overview of the issue:
---------------------------------------------------------------------
Key: FOR-345
Summary: Accent in toc : broken links
Type: Bug
Status: Unassigned
Priority: Minor
Project: Forrest
Components:
Core operations
Versions:
0.6
Assignee:
Reporter: Frédéric Deniger
Created: Tue, 2 Nov 2004 4:19 AM
Updated: Thu, 11 Nov 2004 6:28 AM
Environment: Any
Description:
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 :
|<section>
|<title>Cassé</title>
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"
|src="org.apache.cocoon.transformation.IdGeneratorTransformer">
| <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.
HTH.
Fred
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira