Create a relative hyperlink to file?

classic Classic list List threaded Threaded
21 messages Options
Next » 12
Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Create a relative hyperlink to file?

I am trying to create a Writer document with a number of links to files
in the same directory as the odt file itself. Using absolute paths
everything works perfectly, but relative links (eg. file://abc.xyz)
always fail with a "not an *absolute* URL" error.

TIA

Dave

PS. Apologies if this is a duplicated post.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Luuk Luuk
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?


On 19-9-2020 16:33, Dave Barton wrote:

> I am trying to create a Writer document with a number of links to files
> in the same directory as the odt file itself. Using absolute paths
> everything works perfectly, but relative links (eg. file://abc.xyz)
> always fail with a "not an *absolute* URL" error.
>
> TIA
>
> Dave
>
> PS. Apologies if this is a duplicated post.


you need 3 '/', see: https://en.wikipedia.org/wiki/File_URI_scheme 
<https://en.wikipedia.org/wiki/File_URI_scheme>

I should be: file:///abc.xyz
not: file://abc.xyz


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Windows10 / LibreOffice  (latest?)
remygauthier remygauthier
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Dave Barton-4
Hi,
Does not seem to work with something like file://./abc.xyz either.Rémy.
Le samedi 19 septembre 2020 à 15:33 +0100, Dave Barton a écrit :
> I am trying to create a Writer document with a number of links to
> filesin the same directory as the odt file itself. Using absolute
> pathseverything works perfectly, but relative links (eg.
> file://abc.xyz)
> always fail with a "not an *absolute* URL" error.
> TIA
> Dave
> PS. Apologies if this is a duplicated post.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Luuk
On 19/09/2020 17:55, Luuk wrote:

>
> On 19-9-2020 16:33, Dave Barton wrote:
>> I am trying to create a Writer document with a number of links to files
>> in the same directory as the odt file itself. Using absolute paths
>> everything works perfectly, but relative links (eg. file://abc.xyz)
>> always fail with a "not an *absolute* URL" error.
>>
>> TIA
>>
>> Dave
>>
>> PS. Apologies if this is a duplicated post.
>
>
> you need 3 '/', see: https://en.wikipedia.org/wiki/File_URI_scheme
> <https://en.wikipedia.org/wiki/File_URI_scheme>
>
> I should be: file:///abc.xyz
> not: file://abc.xyz

No. Exactly the same error message.


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Regina Henschel Regina Henschel
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Dave Barton-4
Hi Dave,

Dave Barton schrieb am 19-Sep-20 um 16:33:
> I am trying to create a Writer document with a number of links to files
> in the same directory as the odt file itself. Using absolute paths
> everything works perfectly, but relative links (eg. file://abc.xyz)
> always fail with a "not an *absolute* URL" error.

Du erzeugst den Hyperlink mit Strg+K und dann Dokument?

Versuche nicht den Link von Hand einzugeben sondern benutze _immer_ den
Dateiauswahl-Button rechts vom Sprungziel-Eingabefeld. Dazu muss die zu
verlinkende Datei natürlich schon mit der Textdatei zusammen im gleichen
Ordner liegen. Lass dich nicht von der Anzeige täuschen. Sie zeigt nicht
den gespeicherten Text. In der Datei ist der Link relativ gespeichert.
Solche Links sind eigentlich immer relativ, außer der Weg geht über
Laufwerksgrenzen hinaus.

Wenn du nicht sicher bist, was dort gespeichert ist, dann öffne die
Datei z.B. mit 7Zip und gucke in die content.xml hinein.

Mit freundlichen Grüßen
Regina

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Regina Henschel Regina Henschel
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

Hi Dave,

please excuse, same in English:

Regina Henschel schrieb am 19-Sep-20 um 20:47:
> Hi Dave,
>
> Dave Barton schrieb am 19-Sep-20 um 16:33:
>> I am trying to create a Writer document with a number of links to files
>> in the same directory as the odt file itself. Using absolute paths
>> everything works perfectly, but relative links (eg. file://abc.xyz)
>> always fail with a "not an *absolute* URL" error.
>

You create the hyperlink with Ctrl+K and then Document?

Do not try to manually enter the link, but _always_ use the button at
the right side of the Target input field. Of cause the target needs to
be already in the same folder as the text file.

Be not confused by the shown text. It does not show, what is stored in
the file. The link is stored as relative. Such links are usually stored
as relativ, even if not in the same folder. Only if a target is on a
different drive, the link is absolute.

If you are unsure about the saved text, open the file e.g. with 7Zip and
look into the content.xml. You will find the link starting with ../

Kind regards
Regina


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Dave Barton-4
Hi Dave,

> I am trying to create a Writer document with a number of links to files
> in the same directory as the odt file itself. Using absolute paths
> everything works perfectly, but relative links (eg. file://abc.xyz)
> always fail with a "not an *absolute* URL" error.

The links will be saved als relative links in the file. Try to move the
file to another folder - together with the other documents. It will work.

Have a look in the *.odt-file in content.xml:
<text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
will open the document Bilder_gross.odt, which is in a subfolder of the
document I have created.

For documents you could set in the further settings for a Hyperlink:
Text: "My Document". Then there will be shown only the name "My
Document" for the document. Not the absolute path to the file, which is
saved only for the shown text in the document, not for the real path to
the file. This information of the path is misleading.

Regards

Robert
--
Homepage: https://www.familiegrosskopf.de/robert


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Regina Henschel
On 19/09/2020 19:56, Regina Henschel wrote:
> Hi Dave,
>
> please excuse, same in English:

No problem. Your English is a million times better than my tiny
understanding of German.

> Regina Henschel schrieb am 19-Sep-20 um 20:47:
>> Hi Dave,
>>
>> Dave Barton schrieb am 19-Sep-20 um 16:33:
>>> I am trying to create a Writer document with a number of links to files
>>> in the same directory as the odt file itself. Using absolute paths
>>> everything works perfectly, but relative links (eg. file://abc.xyz)
>>> always fail with a "not an *absolute* URL" error.
>>
>
> You create the hyperlink with Ctrl+K and then Document?
>
> Do not try to manually enter the link, but _always_ use the button at
> the right side of the Target input field. Of cause the target needs to
> be already in the same folder as the text file.
>
> Be not confused by the shown text. It does not show, what is stored in
> the file. The link is stored as relative. Such links are usually stored
> as relativ, even if not in the same folder. Only if a target is on a
> different drive, the link is absolute.
>
> If you are unsure about the saved text, open the file e.g. with 7Zip and
> look into the content.xml. You will find the link starting with ../
>
> Kind regards
> Regina

Hi Regina,

Many thanks for taking the time to reply.

The odt document and the linked files are all in the same local directory.

I open the hyperlink dialog either by the menu, toolbar or keyboard
Ctrl+K. I do not manually enter the link. In the hyperlink dialog I
select the "Open File" button to the right of "Document > Path", see:
http://www.mediafire.com/view/33hc7qwbjtc7dlp/Hyperlink_Dialog.png/file
Selecting the file from the open file dialog ALWAYS adds the full
(ABSOLUTE) path to the hyperlink in the document.

Maybe I have misunderstood or misinterpreted your explanation, but I
cannot find anything in the hyperlink dialog that provides an option to
create a RELATIVE hyperlink to to another file.

I should add that part of my reason for asking this question is that if
I can get this to work it will form the basis of a section in the next
edition of our official Writer Guide, so so telling our readers to unzip
odt files is definitely not an acceptable option.

Thanks & Kind Regards
Dave


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Robert Großkopf
On 19/09/2020 20:01, Robert Großkopf wrote:

> Hi Dave,
>
>> I am trying to create a Writer document with a number of links to files
>> in the same directory as the odt file itself. Using absolute paths
>> everything works perfectly, but relative links (eg. file://abc.xyz)
>> always fail with a "not an *absolute* URL" error.
>
> The links will be saved als relative links in the file. Try to move the
> file to another folder - together with the other documents. It will work.
>
> Have a look in the *.odt-file in content.xml:
> <text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
> will open the document Bilder_gross.odt, which is in a subfolder of the
> document I have created.
>
> For documents you could set in the further settings for a Hyperlink:
> Text: "My Document". Then there will be shown only the name "My
> Document" for the document. Not the absolute path to the file, which is
> saved only for the shown text in the document, not for the real path to
> the file. This information of the path is misleading.
>
> Regards
>
> Robert

Hi Robert,

Many thanks for taking the time to reply.

If you look at my original post and my reply to Regina the odt file and
the hyperlinked files are are already in the same directory, so I see no
reason why moving them to another location would change anything.

It really doesn't matter what appears in content.xml. The critical point
is that keyboard Ctrl+click on the hyperlink in the odt file generates a
"not an *absolute* URL" error.

Sorry if I have misunderstood or misinterpreted the explanation you and
Regina have kindly given, but I need to clearly explain this for
inexperienced users in the next edition of the official LibreOffice
Writer Guide.

Kind Regards
Dave


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Regina Henschel Regina Henschel
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

Hi Dave,

I have now used an English UI, and now the correct fields. Open
Hyperlink-dialog, click Document. Click "Open File" button at the ride
side of the Document Path field.

I have tried with system open file dialog and with LO's own dialog. It
works in both cases. Ctrl-click opens e.g. a linked .odt file in
LibreOffice.

I work on Windows 10. What OS do you use? Perhaps there is an error in
Linux?

Kind regards
Regina

DaveB schrieb am 19-Sep-20 um 23:22:

> On 19/09/2020 20:01, Robert Großkopf wrote:
>> Hi Dave,
>>
>>> I am trying to create a Writer document with a number of links to files
>>> in the same directory as the odt file itself. Using absolute paths
>>> everything works perfectly, but relative links (eg. file://abc.xyz)
>>> always fail with a "not an *absolute* URL" error.
>>
>> The links will be saved als relative links in the file. Try to move the
>> file to another folder - together with the other documents. It will work.
>>
>> Have a look in the *.odt-file in content.xml:
>> <text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
>> will open the document Bilder_gross.odt, which is in a subfolder of the
>> document I have created.
>>
>> For documents you could set in the further settings for a Hyperlink:
>> Text: "My Document". Then there will be shown only the name "My
>> Document" for the document. Not the absolute path to the file, which is
>> saved only for the shown text in the document, not for the real path to
>> the file. This information of the path is misleading.
>>
>> Regards
>>
>> Robert
>
> Hi Robert,
>
> Many thanks for taking the time to reply.
>
> If you look at my original post and my reply to Regina the odt file and
> the hyperlinked files are are already in the same directory, so I see no
> reason why moving them to another location would change anything.
>
> It really doesn't matter what appears in content.xml. The critical point
> is that keyboard Ctrl+click on the hyperlink in the odt file generates a
> "not an *absolute* URL" error.
>
> Sorry if I have misunderstood or misinterpreted the explanation you and
> Regina have kindly given, but I need to clearly explain this for
> inexperienced users in the next edition of the official LibreOffice
> Writer Guide.
>
> Kind Regards
> Dave
>
>


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Robert Funnell Robert Funnell
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

Regina -

FWIW, I just tried it in LO 6.1.5.2 under Debian Linux 10 and it
worked as you said, without an error message, and with the very
misleading appearance of the absolute path in LO (but with the
relative path appearing in content.xml).

- Robert F.

On Sat, 19 Sep 2020, Regina Henschel wrote:

> Hi Dave,
>
> I have now used an English UI, and now the correct fields. Open
> Hyperlink-dialog, click Document. Click "Open File" button at the ride side
> of the Document Path field.
>
> I have tried with system open file dialog and with LO's own dialog. It works
> in both cases. Ctrl-click opens e.g. a linked .odt file in LibreOffice.
>
> I work on Windows 10. What OS do you use? Perhaps there is an error in Linux?
>
> Kind regards
> Regina
>
> DaveB schrieb am 19-Sep-20 um 23:22:
>>  On 19/09/2020 20:01, Robert Großkopf wrote:
>>>  Hi Dave,
>>>
>>>>  I am trying to create a Writer document with a number of links to files
>>>>  in the same directory as the odt file itself. Using absolute paths
>>>>  everything works perfectly, but relative links (eg. file://abc.xyz)
>>>>  always fail with a "not an *absolute* URL" error.
>>>
>>>  The links will be saved als relative links in the file. Try to move the
>>>  file to another folder - together with the other documents. It will work.
>>>
>>>  Have a look in the *.odt-file in content.xml:
>>>  <text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
>>>  will open the document Bilder_gross.odt, which is in a subfolder of the
>>>  document I have created.
>>>
>>>  For documents you could set in the further settings for a Hyperlink:
>>>  Text: "My Document". Then there will be shown only the name "My
>>>  Document" for the document. Not the absolute path to the file, which is
>>>  saved only for the shown text in the document, not for the real path to
>>>  the file. This information of the path is misleading.
>>>
>>>  Regards
>>>
>>>  Robert
>>
>>  Hi Robert,
>>
>>  Many thanks for taking the time to reply.
>>
>>  If you look at my original post and my reply to Regina the odt file and
>>  the hyperlinked files are are already in the same directory, so I see no
>>  reason why moving them to another location would change anything.
>>
>>  It really doesn't matter what appears in content.xml. The critical point
>>  is that keyboard Ctrl+click on the hyperlink in the odt file generates a
>>  "not an *absolute* URL" error.
>>
>>  Sorry if I have misunderstood or misinterpreted the explanation you and
>>  Regina have kindly given, but I need to clearly explain this for
>>  inexperienced users in the next edition of the official LibreOffice
>>  Writer Guide.
>>
>>  Kind Regards
>>  Dave
>>
--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Dan Lewis Dan Lewis
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Dave Barton-4

On 9/19/20 17:22, DaveB wrote:

> On 19/09/2020 20:01, Robert Großkopf wrote:
>> Hi Dave,
>>
>>> I am trying to create a Writer document with a number of links to files
>>> in the same directory as the odt file itself. Using absolute paths
>>> everything works perfectly, but relative links (eg. file://abc.xyz)
>>> always fail with a "not an *absolute* URL" error.
>> The links will be saved als relative links in the file. Try to move the
>> file to another folder - together with the other documents. It will work.
>>
>> Have a look in the *.odt-file in content.xml:
>> <text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
>> will open the document Bilder_gross.odt, which is in a subfolder of the
>> document I have created.
>>
>> For documents you could set in the further settings for a Hyperlink:
>> Text: "My Document". Then there will be shown only the name "My
>> Document" for the document. Not the absolute path to the file, which is
>> saved only for the shown text in the document, not for the real path to
>> the file. This information of the path is misleading.
>>
>> Regards
>>
>> Robert
> Hi Robert,
>
> Many thanks for taking the time to reply.
>
> If you look at my original post and my reply to Regina the odt file and
> the hyperlinked files are are already in the same directory, so I see no
> reason why moving them to another location would change anything.
>
> It really doesn't matter what appears in content.xml. The critical point
> is that keyboard Ctrl+click on the hyperlink in the odt file generates a
> "not an *absolute* URL" error.
>
> Sorry if I have misunderstood or misinterpreted the explanation you and
> Regina have kindly given, but I need to clearly explain this for
> inexperienced users in the next edition of the official LibreOffice
> Writer Guide.
>
> Kind Regards
> Dave

Personally, I think this is a bug. In Debian 64 bit, what you have found
gives the same error for versions, 6.2.8, 6.3.6, and 7.0.1.

Dan



--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Philip Jackson-2 Philip Jackson-2
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Robert Funnell
On 20/09/2020 01:07, Robert Funnell wrote:

> FWIW, I just tried it in LO 6.1.5.2 under Debian Linux 10 and it worked as you said, without an error message, and with the very misleading appearance of the absolute path in LO (but with the relative path appearing in content.xml).
>
> - Robert F.
>
> On Sat, 19 Sep 2020, Regina Henschel wrote:
>
>> Hi Dave,
>>
>> I have now used an English UI, and now the correct fields. Open Hyperlink-dialog, click Document. Click "Open File" button at the ride side of the Document Path field.
>>
>> I have tried with system open file dialog and with LO's own dialog. It works in both cases. Ctrl-click opens e.g. a linked .odt file in LibreOffice.
>>
>> I work on Windows 10. What OS do you use? Perhaps there is an error in Linux?

I just tried in UbuntuStudio 20.04.1 with LO 6.4.5.2 and the procedure works fine as Regina said.

But as Robert says, too, the path is indicated in the absolute form in the Document Path field. Right clicking on the link and selecting Edit Hyperlink also shows an absolute path. But inspection of content.xml confirms that the path is relative.

If the file with the hyperlink is moved to a different directory, the link updates showing again an absolute path as though the linked file has also been moved. But, of course, the link no longer works because it was relative and all the files concerned are no longer in the same directory.

I rechecked on a Windows10 box (up to date) with LO 6.3.5.2 and the behaviour is exactly the same, showing an absolute path when really it is relative.

Indicating an absolute path in the linking dialogue is misleading.

Philip



------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Regina Henschel
Hi Regina & all,

Even though I was following instructions to the letter I must have been
doing something wrong wrong yesterday. Today I started the computers
(Win 10-2004 x64 & Linux Kernel 5.8 x64) running LO 7.0.1.2, opened the
odt file and the relative links worked perfectly. I am still unsure of
how to explain the appearance of absolute paths over the links when
writing up the user guides, but that is a different issue.

Having got the odt file working, I am now looking for a way to get those
relative links working in an exported PDF copy of the file. I have tried
several different export options, but clicking the links in the PDF file
always returns the "File <Absolute Path> not found" error.
Any thoughts or suggestions about this would be welcome.

Thanks for all your help.

Best Regards
Dave

On 19/09/2020 23:05, Regina Henschel wrote:

> Hi Dave,
>
> I have now used an English UI, and now the correct fields. Open
> Hyperlink-dialog, click Document. Click "Open File" button at the ride
> side of the Document Path field.
>
> I have tried with system open file dialog and with LO's own dialog. It
> works in both cases. Ctrl-click opens e.g. a linked .odt file in
> LibreOffice.
>
> I work on Windows 10. What OS do you use? Perhaps there is an error in
> Linux?
>
> Kind regards
> Regina
>
> DaveB schrieb am 19-Sep-20 um 23:22:
>> On 19/09/2020 20:01, Robert Großkopf wrote:
>>> Hi Dave,
>>>
>>>> I am trying to create a Writer document with a number of links to files
>>>> in the same directory as the odt file itself. Using absolute paths
>>>> everything works perfectly, but relative links (eg. file://abc.xyz)
>>>> always fail with a "not an *absolute* URL" error.
>>>
>>> The links will be saved als relative links in the file. Try to move the
>>> file to another folder - together with the other documents. It will
>>> work.
>>>
>>> Have a look in the *.odt-file in content.xml:
>>> <text:a xlink:type="simple" xlink:href="../LibreOffice/Bilder_gross.odt"
>>> will open the document Bilder_gross.odt, which is in a subfolder of the
>>> document I have created.
>>>
>>> For documents you could set in the further settings for a Hyperlink:
>>> Text: "My Document". Then there will be shown only the name "My
>>> Document" for the document. Not the absolute path to the file, which is
>>> saved only for the shown text in the document, not for the real path to
>>> the file. This information of the path is misleading.
>>>
>>> Regards
>>>
>>> Robert
>>
>> Hi Robert,
>>
>> Many thanks for taking the time to reply.
>>
>> If you look at my original post and my reply to Regina the odt file and
>> the hyperlinked files are are already in the same directory, so I see no
>> reason why moving them to another location would change anything.
>>
>> It really doesn't matter what appears in content.xml. The critical point
>> is that keyboard Ctrl+click on the hyperlink in the odt file generates a
>> "not an *absolute* URL" error.
>>
>> Sorry if I have misunderstood or misinterpreted the explanation you and
>> Regina have kindly given, but I need to clearly explain this for
>> inexperienced users in the next edition of the official LibreOffice
>> Writer Guide.
>>
>> Kind Regards
>> Dave
>>
>>
>
>



--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?

In reply to this post by Dave Barton-4
On 19/09/2020 16:33, Dave Barton wrote:
> I am trying to create a Writer document with a number of links to files
> in the same directory as the odt file itself. Using absolute paths
> everything works perfectly, but relative links (eg. file://abc.xyz)
> always fail with a "not an *absolute* URL" error.

What version of LibreOffice are you using, and what is the exact wording
of the error message?  At least with recent versions of LibreOffice, the
wording of the error message when clicking the link should be:
"'file://abc.xyz/' cannot be passed to an external application to open
it (e.g., it might not be an absolute URL, or might denote no existing
file)."

And note that <file://abc.xyz/> is not a relative URL, it is an absolute
file URL with an "abc.xyz" authority, which is interpreted by
LibreOffice at least on Windows to denote the root directory of some
(most likely non-existing) abc.xyz UNC share.


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Dave Barton-4 Dave Barton-4
Reply | Threaded
Open this post in threaded view
|

Re: Create a relative hyperlink to file?


-------- Original Message --------
From: Stephan Bergmann [mailto:[hidden email]]
Sent: Monday, September 21, 2020, 13:35 UTC
To: LibreOffice Users
Cc: Dave Barton
Subject: [libreoffice-users] Create a relative hyperlink to file?

> On 19/09/2020 16:33, Dave Barton wrote:
>> I am trying to create a Writer document with a number of links to files
>> in the same directory as the odt file itself. Using absolute paths
>> everything works perfectly, but relative links (eg. file://abc.xyz)
>> always fail with a "not an *absolute* URL" error.
>
> What version of LibreOffice are you using, and what is the exact wording
> of the error message?  At least with recent versions of LibreOffice, the
> wording of the error message when clicking the link should be:
> "'file://abc.xyz/' cannot be passed to an external application to open
> it (e.g., it might not be an absolute URL, or might denote no existing
> file)."
>
> And note that <file://abc.xyz/> is not a relative URL, it is an absolute
> file URL with an "abc.xyz" authority, which is interpreted by
> LibreOffice at least on Windows to denote the root directory of some
> (most likely non-existing) abc.xyz UNC share.

Hi Stephan,

Thanks for taking the time to reply, but as I said in response to Regina
and others later in this thread: "Today I started the computers
(Win 10-2004 x64 & Linux Kernel 5.8 x64) running LO 7.0.1.2, opened the
odt file and the relative links worked perfectly." I am unable to
discover or explain why it did not work initially.

My issue now is to find a way to get those relative links working in an
exported PDF copy of the file. I have tried several different export
options, but clicking the links in the PDF file always returns the "File
<Absolute Path> not found" error.

Best Regards
Dave

PS. I am subscribed to the list so the cc isn't necessary. ;)


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
wiebe wiebe
Reply | Threaded
Open this post in threaded view
|

Links in documents (was: Create a relative hyperlink to file?)

In reply to this post by Philip Jackson-2
On 20-09-2020 09:01, Philip Jackson wrote:

> But as Robert says, too, the path is indicated in the absolute form in
> the Document Path field. Right clicking on the link and selecting Edit
> Hyperlink also shows an absolute path. But inspection of content.xml
> confirms that the path is relative.
>
> If the file with the hyperlink is moved to a different directory, the
> link updates showing again an absolute path as though the linked file
> has also been moved. But, of course, the link no longer works because it
> was relative and all the files concerned are no longer in the same
> directory.

Is there someone able to shine a light on this subject?

Thing is that links break when mailing or moving and that is a serious flaw.

For example, I would expect a template name without path in a document
xml, result in a search for that template in:

  * the designated template folder
  * the home folder
  * the folder where the document lives

Apparently this does not work, not even one folder is consulted.

Is there some sort of a search path available? A policy? It would really
be helpful if this subject is discussed and I would love to see a
contribution.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

wiebe wiebe
Reply | Threaded
Open this post in threaded view
|

Re: Links in documents

Nobody?

On 23-09-2020 10:45, Wiebe van der Worp wrote:

> On 20-09-2020 09:01, Philip Jackson wrote:
>> But as Robert says, too, the path is indicated in the absolute form in
>> the Document Path field. Right clicking on the link and selecting Edit
>> Hyperlink also shows an absolute path. But inspection of content.xml
>> confirms that the path is relative.
>>
>> If the file with the hyperlink is moved to a different directory, the
>> link updates showing again an absolute path as though the linked file
>> has also been moved. But, of course, the link no longer works because
>> it was relative and all the files concerned are no longer in the same
>> directory.
>
> Is there someone able to shine a light on this subject?
>
> Thing is that links break when mailing or moving and that is a serious
> flaw.
>
> For example, I would expect a template name without path in a document
> xml, result in a search for that template in:
>
>   * the designated template folder
>   * the home folder
>   * the folder where the document lives
>
> Apparently this does not work, not even one folder is consulted.
>
> Is there some sort of a search path available? A policy? It would really
> be helpful if this subject is discussed and I would love to see a
> contribution.
>

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

wiebe wiebe
Reply | Threaded
Open this post in threaded view
|

Re: Links in documents

On 27-09-2020 17:42, Wiebe van der Worp wrote:

>> Thing is that links break when mailing or moving and that is a serious
>> flaw.
>>
>> For example, I would expect a template name without path in a document
>> xml, result in a search for that template in:
>>
>>   * the designated template folder
>>   * the home folder
>>   * the folder where the document lives
>>
>> Apparently this does not work, not even one folder is consulted.
>>
>> Is there some sort of a search path available? A policy? It would
>> really be helpful if this subject is discussed and I would love to see
>> a contribution.

The lack of response is probably a confirmation that there is no
mechanism to keep links to various external sources up to date.

It is probably save to state that if you want to repair a link lacking
an interface element, then unzipping, editng xml and zipping is the only
way.

Odd but okay.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Dave Howorth Dave Howorth
Reply | Threaded
Open this post in threaded view
|

Re: Links in documents

On Wed, 30 Sep 2020 19:33:13 +0200
Wiebe van der Worp <[hidden email]> wrote:

> On 27-09-2020 17:42, Wiebe van der Worp wrote:
>
> >> Thing is that links break when mailing or moving and that is a
> >> serious flaw.
> >>
> >> For example, I would expect a template name without path in a
> >> document xml, result in a search for that template in:
> >>
> >>   * the designated template folder
> >>   * the home folder
> >>   * the folder where the document lives
> >>
> >> Apparently this does not work, not even one folder is consulted.
> >>
> >> Is there some sort of a search path available? A policy? It would
> >> really be helpful if this subject is discussed and I would love to
> >> see a contribution.  
>
> The lack of response is probably a confirmation that there is no
> mechanism to keep links to various external sources up to date.

Which suggests that this is probably the wrong forum to discuss it.
Either a bug report or another mailing list would seem appropriate,
though I don't know which of
https://www.libreoffice.org/get-help/mailing-lists/ is appropriate. :(

> It is probably save to state that if you want to repair a link
> lacking an interface element, then unzipping, editng xml and zipping
> is the only way.
>
> Odd but okay.
>


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Next » 12