On 22/10/2022 12:03, Ihor Radchenko wrote:
Probably, href=file.org is treated as a link to resource packed inside
.odt file.
At least internal anchors should be "#...". I have not figure out how to
embed another document (attach a file) to see its link href.
I tried to look through
https://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators, but I
cannot see any obvious correct way to link to external files from odt.
May someone more familiar with ODT schema take a look?
I tried to create a link to a file in the same directory in LibreOffice
Writer. To my surprise it contains "../"
<text:a xlink:type="simple" xlink:href="../verse.org"
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
<text:span text:style-name="T2">verse</text:span>
</text:a>
I have no idea why implicit xml:base in treated in such way. From my
point of view it is a bug in LibreOffice (6.4.7 in my case).
pandoc-2.5 generates a link that can not be opened by LibreOffice as
well (no leading ../).
echo '<a href="verse.org">A</a>' | pandoc -f html -t odt -o pandoc.odt
<text:a xlink:type="simple" xlink:href="verse.org"
office:name=""><text:span
text:style-name="Definition">A</text:span></text:a>