Bug 107949 - Export to xhtml document always has title of "- no title specified"
Summary: Export to xhtml document always has title of "- no title specified"
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-19 07:41 UTC by rolfofsaxony
Modified: 2017-05-20 10:34 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rolfofsaxony 2017-05-19 07:41:28 UTC
Description:
In the header.xsl file there is the following:
                <!-- title of document for browser frame title -->
                <xsl:element name="title">
                <xsl:attribute name="xml:lang">
                        <xsl:value-of select="$lang" />
                </xsl:attribute>

                        <xsl:choose>
                                <xsl:when test="$globalData/meta-file/*/office:meta/dc:title">
                                        <xsl:value-of select="$globalData/meta-file/*/office:meta/dc:title" />
                                </xsl:when>
                                <!-- providing the mandatory title is a workaround for an IE bug-->
                                <xsl:otherwise>
                                        <xsl:text>- no title specified</xsl:text>
                                </xsl:otherwise>
                        </xsl:choose>
                </xsl:element>

On Linux Mint 17 Libreoffice running with Language English UK any document exported as xhtml whether it has a Title in the document or not always ends up with the .html document having
<title xml:lang="en-US">- no title specified</title>
Whilst this can be edited, it's an annoyance.
Even if the actual title cannot be extracted from the document for some reason the default should at the very least be the filename of the document i.e. "mydocument.html" not "- no title specified"


Steps to Reproduce:
1.Export a .odf document as xhtml
2.
3.

Actual Results:  
<title xml:lang="en-US">- no title specified</title>

Expected Results:
<title xml:lang="en-US">Bandwidth on Linux</title>
Using the actual title in the document
or
<title xml:lang="en-US">bandwidth.html</title>
Using the name of the file


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812
Comment 1 Regina Henschel 2017-05-19 18:00:28 UTC
You have to enter the title in File > Properties, tab Description, field Title.
Comment 2 rolfofsaxony 2017-05-20 07:02:53 UTC
Thank you very much Regina.
There I was thinking that it should be picking the title up from the first Title style item in the document, rather than tucked away in the document properties in the File tab. I must define my internet searches more carefully in the future, as this should have been easy to find :(
Thanks again!
Comment 3 Regina Henschel 2017-05-20 10:34:55 UTC
You can use a forum or mailing list or https://ask.libreoffice.org to get help.