You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Fred <fr...@ifrance.com> on 2004/10/21 08:51:58 UTC

accent in toc and customizing sitemap.xmap

Hi,
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.


To resolve this problem, I'd like to make some changes in the 
sitemap.xmap file.
The initiale source is  (lines 90-94)

|<!-- 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>


by my own code

|<!-- 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>


How can I do this ? (I use the last Forrest version from svn)
TIA
Regards,
Fred




Re: accent in toc and customizing sitemap.xmap

Posted by Dave Brondsema <da...@brondsema.net>.
Fred Deniger wrote:
> David Crossley wrote:
> 
>> Fred wrote:
>>  
>>
>>> 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.
>>>   
>>
>>
>> Try using a specific <section id="blah">
>>  
>>
> Yes , but the files I used are written with openOffice.
> I've found a workaround :
> I've modified openoffice-writer2forrest.xsl  in order to add an id for 
> each section.

Can you create an issue in our issue tracker and attach a patchfile for 
your change, so we can incorporate it back into Forrest?

Thanks

-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Re: accent in toc and customizing sitemap.xmap

Posted by Fred Deniger <fr...@ifrance.com>.
David Crossley wrote:

>Fred wrote:
>  
>
>>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.
>>    
>>
>
>Try using a specific <section id="blah">
>  
>
Yes , but the files I used are written with openOffice.
I've found a workaround :
I've modified openoffice-writer2forrest.xsl  in order to add an id for 
each section.
Thanks for your help

>>To resolve this problem, I'd like to make some changes in the 
>>sitemap.xmap file.
>>The initiale source is  (lines 90-94)
>>
>>|<!-- 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>
>>
>>
>>by my own code
>>
>>|<!-- 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>
>>
>>
>>How can I do this ? (I use the last Forrest version from svn)
>>TIA
>>Regards,
>>Fred
>>
>>    
>>
>
>_____________________________________________________________________
>
>Envie de discuter gratuitement avec vos amis ?
>Téléchargez Yahoo! Messenger http://yahoo.ifrance.com
>
>  
>


Re: accent in toc and customizing sitemap.xmap

Posted by David Crossley <cr...@apache.org>.
Fred wrote:
> 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.

Try using a specific <section id="blah">

Also perhaps this FAQ is relevant:
http://forrest.apache.org/faq.html#label-entity

I don't know about the next following part of your question.

--David

> To resolve this problem, I'd like to make some changes in the 
> sitemap.xmap file.
> The initiale source is  (lines 90-94)
> 
> |<!-- 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>
> 
> 
> by my own code
> 
> |<!-- 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>
> 
> 
> How can I do this ? (I use the last Forrest version from svn)
> TIA
> Regards,
> Fred
>