Re: xsltproc does not render <img src tags inside docbook 5/xml

Bob Stayton <[email protected]>
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
Hi Shlomi,

Thanks for pointing out this problem.  The cause is that DocBook XSL 
checks the filename extension on the fileref, and .webp is not included 
in the list yet.  I'll file a Github issue to fix that, but in the 
meantime, you'll need to use this customization to get it to work:

<xsl:template name="is.graphic.extension">
   <xsl:param name="ext"></xsl:param>
   <xsl:variable name="lcext" select="translate($ext,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')"/>
   <xsl:if test="$lcext = 'svg'
              or $lcext = 'png'
              or $lcext = 'jpeg'
              or $lcext = 'jpg'
              or $lcext = 'avi'
              or $lcext = 'mpg'
              or $lcext = 'mp4'
              or $lcext = 'mpeg'
              or $lcext = 'qt'
              or $lcext = 'gif'
              or $lcext = 'acc'
              or $lcext = 'mp1'
              or $lcext = 'mp2'
              or $lcext = 'mp3'
              or $lcext = 'mp4'
              or $lcext = 'm4v'
              or $lcext = 'm4a'
              or $lcext = 'wav'
              or $lcext = 'ogv'
              or $lcext = 'ogg'
              or $lcext = 'webm'
              or $lcext = 'webp'
              or $lcext = 'bmp'">1</xsl:if>
</xsl:template>

Bob Stayton
[email protected]

On 11/20/2019 9:16 AM, Shlomi Fish wrote:
> hi all!
>
> with the attached file and the command:
>
> xsltproc --nonet
> http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl
> my-real-person-fan-fiction.docbook5.xml | less
>
> I am not seeing any <img> tags. See:
>
> https://github.com/shlomif/my-real-person-fan-fiction for the asciidoc sources.
>
> I am on fedora 31 x86-64.
>
> How can i get the img tags working?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.