You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jordan Naftolin <jo...@apache.org> on 2000/06/22 02:57:16 UTC

Internal Links

Okay, internal link functionality has been checked in.  You should now be able to set-up the following scenario:

Have somewhere in your document: 
<fo:simple-link internal-destination="foo">link to foo</fo:simple-link>

and then somewhere else in your document (either before or after the simple-link), have

<fo:block id="foo"/>

The link should jump to the page where the id is located such that the id location is at the top of the page.  I would really appreciate it if people could try this out to ensure that it works properly for their documents (it seems to work well for me).  

FOP should spit out an error if either an id is duplicated (since they are supposed to be unique), or if there is a reference to an id that doesn't exist.

The only issue that came up while implementing internal links is what should happen for id's specified within children of static content?  The current implementation allows users to put id's within children of static content, but as soon as the id is created for the second time (i.e. when the static content is used for the second page), FOP will complain.  Is this okay?  Other possibilities are not allowing id's within children of static content at all, or just ignoring id's within children of static content.  I personally like the current implementation, but I'd appreciate your opinions.

Your feedback is appreciated.
Thanks,
Jordan


Re: Internal Links - problem

Posted by Keiron Liddle <ke...@aftexsw.com>.
I have encountered a problem with the id references.
The code throws an exception if the same id occurs twice, this causes a
problem if an fo:block is laid out twice due to being initially placed
near the end of a page. I presume it initially thinks it will be able to
place the item at the end of the page, then it has a page break and
needs to lay it out again.

Everything else looks good, thanks.

Side Note: we should have a test case where blocks are laid out twice
over a page break, since this is the second problem not found.

>  and then somewhere else in your document (either before or after the
> simple-link), have <fo:block id="foo"/> The link should jump to the
> page where the id is located such that the id location is at the top
> of the page.  I would really appreciate it if people could try this
> out to ensure that it works properly for their documents (it seems to
> work well for me). FOP should spit out an error if either an id is
> duplicated (since they are supposed to be unique), or if there is a
> reference to an id that doesn't exist.

Re: Internal Links

Posted by Fotis Jannidis <Fo...@lrz.uni-muenchen.de>.
> Okay, internal link functionality has been checked in.  
Very nice addition!

I added a content page to the readme.fo where every entry is linked to the actual 
section. Works great. The external-destination examples work too (all tested with 
Windows 98 and Acrobat Reader 4.0). 

Fotis