forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Document Linking
Date Wed, 19 Mar 2003 11:09:09 GMT
On Wed, Mar 19, 2003 at 11:06:27AM +0100, Oliver Alth wrote:
> 
> And how can i link to an anchor in the general.html document
> without nested elements. I would like to have more menu items
> that link to the same document, but to different anchors.
> 
> shall i use:
> 
> <author label="Author" href="general.html#author">
> 
> when i defined an anchor named author in my general.xml?

That should work, but I think it doesn't, due to a stylesheet trying to
be too clever and 'infer' a node's status from the presence or absence of
a '#' character.  Something that should be fixed before 0.5 is released.

Hacky Solution: edit context/library/xslt/site2book.xsl, notice
the awfulness of the '*/*' template, and hack up a temporary solution.
For instance, inserting this at the beginning of the <xsl:choose> (line
27) should fix things:

   <xsl:when test="contains(@href, '.html#') and @label">
      <menu-item label="{@label}" href="{@href}"/>
   </xsl:when>

Non-hacky but boring solution: don't use site.xml.  Instead, write a
book.xml file for each directory.


--Jeff

> oliver
> 

Mime
View raw message