mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 12:16:13 +01:00
FB2 Output: Use short xlink namespace
This commit is contained in:
parent
88159288a8
commit
0f5b72b437
1 changed files with 3 additions and 3 deletions
|
|
@ -196,7 +196,7 @@ def fb2_header(self):
|
|||
metadata['comments'] = '<annotation>{}</annotation>'.format(prepare_string_for_xml(html2text(comments.value.strip())))
|
||||
|
||||
return textwrap.dedent('''
|
||||
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
|
||||
<description>
|
||||
<title-info>
|
||||
<genre>%(genre)s</genre>
|
||||
|
|
@ -255,7 +255,7 @@ def get_cover(self):
|
|||
# Only write the image tag if it is in the manifest.
|
||||
if cover_href in self.oeb_book.manifest.hrefs and cover_href not in self.image_hrefs:
|
||||
self.image_hrefs[cover_href] = 'img_%s' % len(self.image_hrefs)
|
||||
return '<coverpage><image xlink:href="#%s" /></coverpage>' % self.image_hrefs[cover_href]
|
||||
return '<coverpage><image l:href="#%s" /></coverpage>' % self.image_hrefs[cover_href]
|
||||
|
||||
return ''
|
||||
|
||||
|
|
@ -466,7 +466,7 @@ def dump_text(self, elem_tree, stylizer, page, tag_stack=[]):
|
|||
p_txt, p_tag = self.ensure_p()
|
||||
fb2_out += p_txt
|
||||
tags += p_tag
|
||||
fb2_out.append('<image xlink:href="#%s" />' % self.image_hrefs[ihref])
|
||||
fb2_out.append('<image l:href="#%s" />' % self.image_hrefs[ihref])
|
||||
else:
|
||||
self.log.warn(u'Ignoring image not in manifest: %s'%ihref)
|
||||
if tag in ('br', 'hr') or ems >= 1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue