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 09:48:10 GMT
On Wed, Mar 19, 2003 at 10:15:43AM +0100, Oliver Alth wrote:
> Hello,
> 
> 
> i am trying the following to get the menu items defined in site.xml
> 
> <general label="General" href="general/">
>             <author label="Author" href="general.html">
>                   <top href="#top"/>
>                   <section href="#author"/>
>             </author>
>             <version label="Version" href="general.html">
>                   <top href="#top"/>
>                   <section href="#version"/>
>             </version>
>             <todo label="Todo" href="general.html">
>                   <top href="#top"/>
>                   <section href="#todo"/>
>             </todo>
>   </general>
> 
> 
> In general.xml, e.g. the anchor looks like:
> 
> <body>
> 
>       <anchor id="author"/>
>     <section>

By the way, you should rather make that:

     <section id="author">

>       <title>About the authors</title>
>        <section>
>         <title> Johann Pramberger </title>
>             <p>Xtcm, or Xscml as it was called earlier,
>             was originally developed by Johann Pramberger at
>         the Software Management department at Boeblingen Lab.
>             The original name defined a prototype that could execute
>             local or mapped programs. For questions on that prototype,
>             please contact Johann Pramberger.
>         </p>
>           </section>
> 
> ....
> 
> The links don't work, when I click on the menu items, it is always referred
> to the top of the page.

In site.xml, any element without a label attribute is 'hidden'.  So if you
have:

    <author label="Author" href="general.html">
          <top href="#top"/>
          <section href="#author"/>
    </author>

You will get a single <a href="general.html">Author</a> link.

The only effect of the nested <top> and <section> elements is that you will be
able to say <link href="site:author/section"> in other pages, and the link will
be rewritten to <a href="general/general.html#author">.

--Jeff

http://xml.apache.org/forrest/linking.html

Mime
View raw message