1
0

s5.xsl 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="ASCII"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns="http://www.w3.org/1999/xhtml"
  4. xmlns:db="http://docbook.org/ns/docbook"
  5. xmlns:dbs="http://docbook.org/ns/docbook-slides"
  6. exclude-result-prefixes="dbs db"
  7. version="1.0">
  8. <xsl:import href="plain.xsl"/>
  9. <!-- XXX: recommended by S5 but DocBook XSL produces XHTML Transitional
  10. <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
  11. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
  12. -->
  13. <xsl:template name="xhtml.head">
  14. <xsl:variable name="s5.controls.visible">
  15. <xsl:choose>
  16. <xsl:when test="$s5.controls != 0">visible</xsl:when>
  17. <xsl:otherwise>hidden</xsl:otherwise>
  18. </xsl:choose>
  19. </xsl:variable>
  20. <meta name="generator" content="DocBook Slides Stylesheets V{$VERSION}"/>
  21. <meta name="version" content="S5 1.1"/>
  22. <meta name="defaultView" content="{$s5.defaultview}"/>
  23. <meta name="controlVis" content="{$s5.controls.visible}"/>
  24. <link rel="stylesheet" href="{concat($s5.path.prefix, $s5.slides.css)}" type="text/css" media="projection" id="slideProj" />
  25. <link rel="stylesheet" href="{concat($s5.path.prefix, $s5.outline.css)}" type="text/css" media="screen" id="outlineStyle" />
  26. <link rel="stylesheet" href="{concat($s5.path.prefix, $s5.print.css)}" type="text/css" media="print" id="slidePrint" />
  27. <link rel="stylesheet" href="{concat($s5.path.prefix, $s5.opera.css)}" type="text/css" media="projection" id="operaFix" />
  28. <link rel="stylesheet" href="{$user.css}" type="text/css"/>
  29. <script src="{concat($s5.path.prefix, $s5.slides.js)}" type="text/javascript"></script>
  30. </xsl:template>
  31. <xsl:template name="slideshow.head">
  32. <div class="layout">
  33. <div id="controls"/>
  34. <div id="currentSlide"/>
  35. <div id="header">
  36. <xsl:apply-templates select="/" mode="slide.header.mode"/>
  37. </div>
  38. <div id="footer">
  39. <xsl:apply-templates select="/" mode="slide.footer.mode"/>
  40. </div>
  41. </div>
  42. </xsl:template>
  43. <xsl:template match="db:xref">
  44. <xsl:variable name="target" select="id(./@linkend)"/>
  45. <xsl:choose>
  46. <xsl:when test="($target[self::dbs:foil] or $target[self::dbs:foilgroup])">
  47. <xsl:variable name="target.no" select="count(preceding::dbs:foil|preceding::dbs:foilgroup) + 1"/>
  48. <xsl:apply-templates select="$target" mode="xref-to"/>
  49. </xsl:when>
  50. <xsl:otherwise>
  51. <xsl:call-template name="xref"/>
  52. </xsl:otherwise>
  53. </xsl:choose>
  54. </xsl:template>
  55. <xsl:template match="db:biblioentry" mode="xref-to">
  56. <xsl:variable name="id" select="@xml:id"/>
  57. <xsl:choose>
  58. <xsl:when test="$bibliography.numbered != 0">
  59. <xsl:number from="db:bibliography" count="db:biblioentry|db:bibliomixed" level="any" format="1"/>
  60. </xsl:when>
  61. <xsl:otherwise>
  62. <xsl:value-of select="$id"/>
  63. </xsl:otherwise>
  64. </xsl:choose>
  65. </xsl:template>
  66. <xsl:template match="db:mediaobject">
  67. <p>
  68. <xsl:if test="@dbs:style">
  69. <xsl:attribute name="class">
  70. <xsl:value-of select="@dbs:style"/>
  71. </xsl:attribute>
  72. </xsl:if>
  73. <xsl:apply-templates/>
  74. </p>
  75. </xsl:template>
  76. </xsl:stylesheet>