forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <>
Subject Re: Sections & anchors
Date Sat, 18 May 2002 16:00:07 GMT

Piroumian Konstantin wrote:

>Yes, I know and this is implemented already in document2html.xsl. But you
>got me a little wrong. I'd like to have in the content part a link to other
>section, say:
> <article>
>    <section>
>       <title>blah b;ah b;ah</title>
>       <para>blah b;ah b;ah. See <jump href="../section[2]"/></para>
>    </section>
>    <section>
>       <title>bloh b;oh b;oh</title>
>       <para>bloh b;oh b;oh</para>
>    </section>
> </article>
>Is it possible without dynamic XPath evaluation (which is supported only in
>XSLT 2.0)?
Oh - sorry - You are right. There is no good solution, currently. There 
are some pure XSL extension functions (FXSLT ?? don't use them so i have 
not followed their dev), but it would probably be easier to give you the 
id at the section level than perform the expensive XPath.

Even with XSLT 2.0, i would not want to rely on the section's *position* 
to create the the link. There is a possibility that sections will get 
reordered. That goes for numbering elements too.

<fwiw role="probably_not_too_helpful">
Are the sections separate XML docs (or whatever)? If so, you know you 
can always link to the ID of the XML piece.

What i do instead having a large XML is break it up into small documents 
that I *think* might be reusable. The XML becomes much simpler and you 
can reorganize your page much easier. Those small documents *do* have an 
ID. This does not address dD
View raw message