Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: Core operations
    • Labels:
      None
    • 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

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        119d 2h 43m 1 Ross Gardler 01/Mar/05 15:02
        Ross Gardler made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 0.7 [ 10031 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Ross Gardler added a comment -
        Patch applied - thanks
        Show
        Ross Gardler added a comment - Patch applied - thanks
        Cyriaque Dupoirieux made changes -
        Attachment patch.txt [ 10418 ]
        Hide
        Cyriaque Dupoirieux added a comment -
        Here is a patch which update the org/apache/forrest/util/IdGeneratorTransformer.java in order to call the new URLEncoder.encode(id, format) method which allows to force the encoding to "UTF-8".
        Tested on my machine it works very well...
        Show
        Cyriaque Dupoirieux added a comment - Here is a patch which update the org/apache/forrest/util/IdGeneratorTransformer.java in order to call the new URLEncoder.encode(id, format) method which allows to force the encoding to "UTF-8". Tested on my machine it works very well...
        Ross Gardler made changes -
        Field Original Value New Value
        Assignee Ross Gardler [ rgardler ]
        Hide
        Ross Gardler added a comment -
        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
        Show
        Ross Gardler added a comment - 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
        Frédéric Deniger created issue -

          People

          • Assignee:
            Ross Gardler
            Reporter:
            Frédéric Deniger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development