After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 546623 - export to html doesn't follow links
export to html doesn't follow links
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-06 16:35 UTC by Pedro Villavicencio
Modified: 2009-04-23 01:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Resolve note URIs only once (4.15 KB, patch)
2008-08-07 21:12 UTC, Stefan Schweizer
committed Details | Review

Description Pedro Villavicencio 2008-08-06 16:35:01 UTC
this bug has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/tomboy/+bug/211118

"Suppose you make 3 notes like this:

note A, with a link to note B and C

note B - no links

note C - no links

When note A is exported with 'Export linked notes' and 'Include all other linked notes' checked it will export correctly, with notes B and C included below A.

Now suppose you edit note B by adding a link to note C

Now when note A is exported with 'Export linked notes' and 'Include all other linked notes' checked note C will be missing from the html results"

Thanks,
Comment 1 Stefan Schweizer 2008-08-07 20:54:50 UTC
NoteNameResolver allows resolving a note URI only once (in fact twice) to avoid endless loops of linked notes. But the current implementation of the stylesheet requires resolving a URI every time a link is created to an exported note.

Patch follows.
Comment 2 Stefan Schweizer 2008-08-07 21:12:51 UTC
Created attachment 116100 [details] [review]
Resolve note URIs only once

This patch removes the xsl:key stuff, that never worked, from the stylesheet. The key() function can only return a node-set from the current document, so it cannot keep a list of all processed documents.

A note URI is resolved every time the document() function is used in the stylesheet but that is not necessary in the link:internal template. Now notes are only resolved once, when they are inserted into the resulting html document. I also changed the NoteNameResolver to maintain a list instead of a dictionary of already resolved notes.
Comment 3 Sandy Armstrong 2008-08-07 21:40:41 UTC
You know best, Stefan.  Can you commit this?
Comment 4 Stefan Schweizer 2008-08-07 22:12:58 UTC
Committed in revision 2069.