images in HTML
authorJan Szejko <j-sz@o2.pl>
Tue, 15 Mar 2016 15:36:46 +0000 (16:36 +0100)
committerJan Szejko <j-sz@o2.pl>
Tue, 15 Mar 2016 15:36:46 +0000 (16:36 +0100)
librarian/html.py
librarian/xslt/book2html.xslt

index 6a6e3db..73da1b8 100644 (file)
@@ -57,6 +57,7 @@ def transform(wldoc, stylesheet='legacy', options=None, flags=None):
 
         if not options:
             options = {}
 
         if not options:
             options = {}
+        options.setdefault('gallery', "''")
         result = document.transform(style, **options)
         del document  # no longer needed large object :)
 
         result = document.transform(style, **options)
         del document  # no longer needed large object :)
 
index c8aa52b..715490e 100644 (file)
 <xsl:template match="ilustr">
     <img>
         <xsl:attribute name="src">
 <xsl:template match="ilustr">
     <img>
         <xsl:attribute name="src">
-            <xsl:value-of select="@src" />
+            <xsl:value-of select="$gallery" /><xsl:value-of select="@src" />
         </xsl:attribute>
         <xsl:attribute name="alt">
             <xsl:value-of select="@alt" />
         </xsl:attribute>
         <xsl:attribute name="alt">
             <xsl:value-of select="@alt" />