forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Wheller <s...@inwords.co.za>
Subject Fixed Re: Help FOR-308
Date Tue, 05 Oct 2004 12:52:00 GMT
On Tuesday 05 October 2004 12:26, Sean Wheller wrote:
> On Tuesday 05 October 2004 10:38, David Crossley wrote:
> > Sean Wheller wrote:
> > > I want to add support for xref to docbook2document.xsl so I created the
> > > following template:
> >
> > <snip/>
> >
> > > My template creates the links, but does not work because forrest is
> > > adding its own anchor @id to sections. So the link is displayed with
> > > the right text, but goes nowhere since the target does not exist in the
> > > rendered html document.
> >
> > Oh. I wonder if the generation of forrest default id can
> > be made configurable. Anyway, to get on with your work
> > you might be able to comment-out the IdGen transformers.
> > cd src/core/context/
> > grep idgen *.xmap
>
> Nope that does not do it. Now I get my link @href pointing
>
> Like this
> <a href="#blank9">Klank Ka Klank 9</a>
>
> To
>
> <a name="N10084"></a>
> <h2 class="boxed">Klank Ka Klank 9</h2>
> <div class="section">
> <p>Text</p>
> </div>
>
> Instead of
>
> <a name="blank9"></a>
> <h2 class="boxed">Klank Ka Klank 9</h2>
> <div class="section">
> <p>Text</p>
> </div>
>
> Perhaps this has something to do with "linkrewriter" can really say since
> so may things impact on the document as it goes through the pipe and I have
> not fully understood pipes after the transform to forrest format.

Hi,

After some tinkering I noted that I was transforming to document-v1.3 dtd. So 
I changed to document-v2.0 dtd.

Then I looked at how section is created in docbook2document.xsl and noted that 
it was not doing the job. So removed the template matching section and 
improved the template matching sect1|sect2|sect3..... and added section to 
this template. This was more intrusive than I wanted to be, but I thought it 
was needed, since it was the only way to get the xref template to work.

The result is that any docbook 4.2 transformed to document-v2.0 will be able 
to use xref's that actually work out-the-box.

note: at present all idgens are UNCOMMENTED.

The new patch is in issue tracker
http://issues.cocoondev.org/browse/FOR-308

 
-- 
Sean Wheller
Technical Author
084-8549408
sean@inwords.co.za
http://www.inwords.co.za

Mime
View raw message