From: Bob Stayton Date: Mon, 16 Apr 2012 20:41:20 +0000 (+0000) Subject: Fix handling of mediatypes for video and audio files, mostly for HTML5 and EPUB3... X-Git-Tag: release/1.79.1~6^2~489 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=987d8dc96393aac2a321517727cbc604635484f0;p=docbook-dsssl Fix handling of mediatypes for video and audio files, mostly for HTML5 and EPUB3 outputs. --- diff --git a/xsl/common/common.xsl b/xsl/common/common.xsl index 10c89cef7..accb34344 100644 --- a/xsl/common/common.xsl +++ b/xsl/common/common.xsl @@ -1,4 +1,8 @@ + + + ]> + + + + Returns mimetype for media format + + This takes as input a 'format' param and returns + a mimetype string. It uses an xsl:choose after first + converting the input to all uppercase. + + + + + + + + + application/postscript + application/pdf + image/png + image/svg+xml + image/jpeg + image/jpeg + image/gif + image/gif + image/gif + audio/acc + audio/mpeg + audio/mpeg + audio/mpeg + audio/mpeg + audio/mp4 + audio/mpeg + audio/wav + video/mp4 + video/mp4 + video/ogg + video/ogg + video/webm + + + + + + diff --git a/xsl/epub3/epub3-element-mods.xsl b/xsl/epub3/epub3-element-mods.xsl index 0246399ce..0c7707cea 100644 --- a/xsl/epub3/epub3-element-mods.xsl +++ b/xsl/epub3/epub3-element-mods.xsl @@ -1156,25 +1156,6 @@ article toc,title,figure,table,example,equation - - - - - - application/postscript - application/pdf - image/png - image/svg+xml - image/jpeg - image/gif - image/gif - - - - - - @@ -1433,9 +1414,12 @@ article toc,title,figure,table,example,equation - + @@ -1446,6 +1430,16 @@ article toc,title,figure,table,example,equation + + + + + + + + + + @@ -1477,7 +1471,7 @@ article toc,title,figure,table,example,equation - + diff --git a/xsl/fo/graphics.xsl b/xsl/fo/graphics.xsl index 1d7f73418..4bde8165d 100644 --- a/xsl/fo/graphics.xsl +++ b/xsl/fo/graphics.xsl @@ -93,32 +93,6 @@ concat(' ', $lcext, ' '))">1 - - - - - - - - - - - - application/postscript - application/pdf - image/png - image/svg+xml - image/jpeg - image/gif - image/gif - - - - - - - diff --git a/xsl/html/graphics.xsl b/xsl/html/graphics.xsl index 68e9dd6de..cf957c549 100644 --- a/xsl/html/graphics.xsl +++ b/xsl/html/graphics.xsl @@ -53,9 +53,21 @@ 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 = 'bmp'">1