ISBN in epub/mobi
[librarian.git] / librarian / pdf / wl2tex.xslt
index d39dea5..43092e7 100644 (file)
             <xsl:if test=".//dc:publisher">
                 Wydawca:
                 <TeXML escape="1">
             <xsl:if test=".//dc:publisher">
                 Wydawca:
                 <TeXML escape="1">
-                    <xsl:for-each select="//dc:publisher/text()">
+                    <xsl:for-each select=".//dc:publisher/text()">
                         <xsl:value-of select="."/>
                         <xsl:if test="not(position() = last())">, </xsl:if>
                     </xsl:for-each>
                         <xsl:value-of select="."/>
                         <xsl:if test="not(position() = last())">, </xsl:if>
                     </xsl:for-each>
                 \vspace{.6em}
             </xsl:if>}
         \def\description{<TeXML escape="1"><xsl:apply-templates select=".//dc:description" mode="inline" /></TeXML>}
                 \vspace{.6em}
             </xsl:if>}
         \def\description{<TeXML escape="1"><xsl:apply-templates select=".//dc:description" mode="inline" /></TeXML>}
+        <xsl:if test=".//meta[@id='pdf-id']">
+            <xsl:variable name="isbn" select=".//meta[@id='pdf-id']"/>
+            \def\isbn{ISBN <xsl:value-of select="substring-after($isbn, 'ISBN-')"/>}
+        </xsl:if>
     </TeXML>
 </xsl:template>
 
     </TeXML>
 </xsl:template>
 
     <cmd name="par" />
     <cmd name="vspace"><parm>1em</parm></cmd>
     <group><cmd name="raggedright" />
     <cmd name="par" />
     <cmd name="vspace"><parm>1em</parm></cmd>
     <group><cmd name="raggedright" />
-    <env name="longtabu"> to <TeXML escape="0">\textwidth </TeXML>
+    <xsl:element name="env">
+        <xsl:attribute name="name">
+            <xsl:choose>
+                <xsl:when test="name(.)='tabela'">longtabu</xsl:when>
+                <xsl:otherwise>tabu</xsl:otherwise>
+            </xsl:choose>
+        </xsl:attribute> to <TeXML escape="0">\textwidth </TeXML>
       <!--parm><cmd name="textwidth"/></parm-->
       <parm><TeXML escape="0"><xsl:value-of select="@_format" /></TeXML></parm>
         <xsl:choose>
       <!--parm><cmd name="textwidth"/></parm-->
       <parm><TeXML escape="0"><xsl:value-of select="@_format" /></TeXML></parm>
         <xsl:choose>
           <xsl:apply-templates/>
         </xsl:otherwise>
         </xsl:choose>
           <xsl:apply-templates/>
         </xsl:otherwise>
         </xsl:choose>
-    </env>
+    </xsl:element>
     </group>
     <cmd name="vspace"><parm>1em</parm></cmd>
 </xsl:template>
     </group>
     <cmd name="vspace"><parm>1em</parm></cmd>
 </xsl:template>