]> granicus.if.org Git - docbook-dsssl/commitdiff
Introduced variable in opf.guide
authorThomas Schraitle <tom_schr@web.de>
Thu, 2 May 2013 06:37:59 +0000 (06:37 +0000)
committerThomas Schraitle <tom_schr@web.de>
Thu, 2 May 2013 06:37:59 +0000 (06:37 +0000)
xsl/epub/docbook.xsl

index 97237d74b9ec94a8f07ed49c212eb4d0b6fae30e..3dfa237d127a6d97076083b4580201a29a33860a 100644 (file)
   </xsl:template>
 
   <xsl:template name="opf.guide">
+    <xsl:variable name="info" select="*/*[contains(local-name(.), 'info')][1]"/>
+    
     <xsl:if test="contains($toc.params, 'toc') or 
-                  /*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+                  $info/cover or 
+                  $info//mediaobject[@role='cover' or ancestor::cover]"> 
       <xsl:element namespace="http://www.idpf.org/2007/opf" name="guide">
-        <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+        <xsl:if test="$info/cover or $info//mediaobject[@role='cover' or ancestor::cover]"> 
           <xsl:element namespace="http://www.idpf.org/2007/opf" name="reference">
             <xsl:attribute name="href">
               <xsl:value-of select="$epub.cover.html" />