Bug Hunting Session
Bug 57647 - FILESAVE: intradocument xrefs broken in XHTML export
Summary: FILESAVE: intradocument xrefs broken in XHTML export
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium normal
Assignee: Peter Jentsch
Whiteboard: target:4.0.0
Depends on:
Reported: 2012-11-28 06:57 UTC by callow.mark
Modified: 2013-02-01 20:10 UTC (History)
0 users

See Also:
Crash report or crash signature:

Document showing 2 xref problems (27.97 KB, application/vnd.oasis.opendocument.text)
2012-11-28 07:07 UTC, callow.mark

Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2012-11-28 06:57:22 UTC
Intradocument xrefs in the exported file are completely missing, in the majority of cases. However, in one case the link text continues from the actual link until the end of the section. I'll attach a short document showing both of these problems.

This is with File > Export > XHTML.
Comment 1 callow.mark 2012-11-28 07:07:23 UTC
Created attachment 70722 [details]
Document showing 2 xref problems

This file shows both issues.

On the 3rd page is an xref to "Invariance of Undefined Values" which is the following section. (The section number text is incorrect but if I open "Fields..." it seems to be pointing to the right place. I'm not familiar enough with LibreOffice to know how to get the text updated.) In the XHTML export there is no link.

On the 4th page is a reference to "Section 5.10". Note that only the target section number is linked to the referenced section. In the XHTML export the entire text from "5.10 to the end of the section is highlighted at a link. Looking at the XHTML source you can see that the <a> tag is repeated multiple times, most with empty text, until the a final one starting before the '"' following 5.10 and ending at the end of the section.
Comment 2 callow.mark 2012-11-28 07:09:53 UTC
I'm taking a bit of a liberty here Peter to ensure that you see this bug. Apologies if you are the wrong person for this.
Comment 3 Peter Jentsch 2012-11-29 22:18:04 UTC
confirming the bugs. 

the latter symptom relates to the fact that we're not really outputting xhtml but plain xml. xhtml mandates that non empty element types have a closing tag (like <a></a>, while xml allows <a/>. 

Forcing xhtml output would require removing the mathml doctype extension, and I'm not sure if that's required. 

So I'm keeping that in place and we'll now just omit empty <a href..> elements (because they'd be invisible if properly closed anyway).
Comment 4 Not Assigned 2012-11-29 22:28:01 UTC
Peter Jentsch committed a patch related to this issue.
It has been pushed to "master":


fix fdo#57647 intradocument xrefs broken in xhtml

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 5 callow.mark 2012-12-06 02:16:38 UTC
There seems to be a problem with the OSX 10.7 build. The latest entry in


is dated Nov. 30th and it is incomplete.

Builds for other platforms have been updated much more recently.

As I result I am as yet unable to verify this fix.
Comment 6 Peter Jentsch 2012-12-06 12:57:54 UTC
Hi Marc, 

just leave the ticket as RESOLVED/FIXED. UNCONFIRMED is used to indicate that nobody was able to confirm that the bug really exists and is a bug.

The should be a status "VERIFIED" that indicates successful validation of a fix.