1
0

plain-titlepage.xsl 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
  3. <!-- This stylesheet was created by template/titlepage.xsl-->
  4. <xsl:template name="slides.titlepage.recto">
  5. <xsl:choose>
  6. <xsl:when test="slidesinfo/title">
  7. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/title"/>
  8. </xsl:when>
  9. <xsl:when test="docinfo/title">
  10. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/title"/>
  11. </xsl:when>
  12. <xsl:when test="info/title">
  13. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/title"/>
  14. </xsl:when>
  15. <xsl:when test="title">
  16. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="title"/>
  17. </xsl:when>
  18. </xsl:choose>
  19. <xsl:choose>
  20. <xsl:when test="slidesinfo/subtitle">
  21. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/subtitle"/>
  22. </xsl:when>
  23. <xsl:when test="docinfo/subtitle">
  24. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  25. </xsl:when>
  26. <xsl:when test="info/subtitle">
  27. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/subtitle"/>
  28. </xsl:when>
  29. <xsl:when test="subtitle">
  30. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="subtitle"/>
  31. </xsl:when>
  32. </xsl:choose>
  33. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/corpauthor"/>
  34. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  35. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/corpauthor"/>
  36. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/authorgroup"/>
  37. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  38. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/authorgroup"/>
  39. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/author"/>
  40. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/author"/>
  41. <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/author"/>
  42. </xsl:template>
  43. <xsl:template name="slides.titlepage.verso">
  44. </xsl:template>
  45. <xsl:template name="slides.titlepage.separator">
  46. </xsl:template>
  47. <xsl:template name="slides.titlepage.before.recto">
  48. </xsl:template>
  49. <xsl:template name="slides.titlepage.before.verso">
  50. </xsl:template>
  51. <xsl:template name="slides.titlepage">
  52. <div class="slide cover title">
  53. <xsl:variable name="recto.content">
  54. <xsl:call-template name="slides.titlepage.before.recto"/>
  55. <xsl:call-template name="slides.titlepage.recto"/>
  56. </xsl:variable>
  57. <xsl:variable name="recto.elements.count">
  58. <xsl:choose>
  59. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  60. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  61. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  62. <xsl:otherwise>1</xsl:otherwise>
  63. </xsl:choose>
  64. </xsl:variable>
  65. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  66. <div><xsl:copy-of select="$recto.content"/></div>
  67. </xsl:if>
  68. <xsl:variable name="verso.content">
  69. <xsl:call-template name="slides.titlepage.before.verso"/>
  70. <xsl:call-template name="slides.titlepage.verso"/>
  71. </xsl:variable>
  72. <xsl:variable name="verso.elements.count">
  73. <xsl:choose>
  74. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  75. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  76. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  77. <xsl:otherwise>1</xsl:otherwise>
  78. </xsl:choose>
  79. </xsl:variable>
  80. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  81. <div><xsl:copy-of select="$verso.content"/></div>
  82. </xsl:if>
  83. <xsl:call-template name="slides.titlepage.separator"/>
  84. </div>
  85. </xsl:template>
  86. <xsl:template match="*" mode="slides.titlepage.recto.mode">
  87. <!-- if an element isn't found in this mode, -->
  88. <!-- try the generic titlepage.mode -->
  89. <xsl:apply-templates select="." mode="titlepage.mode"/>
  90. </xsl:template>
  91. <xsl:template match="*" mode="slides.titlepage.verso.mode">
  92. <!-- if an element isn't found in this mode, -->
  93. <!-- try the generic titlepage.mode -->
  94. <xsl:apply-templates select="." mode="titlepage.mode"/>
  95. </xsl:template>
  96. <xsl:template match="title" mode="slides.titlepage.recto.auto.mode">
  97. <div xsl:use-attribute-sets="slides.titlepage.recto.style">
  98. <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
  99. </div>
  100. </xsl:template>
  101. <xsl:template match="subtitle" mode="slides.titlepage.recto.auto.mode">
  102. <div xsl:use-attribute-sets="slides.titlepage.recto.style">
  103. <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
  104. </div>
  105. </xsl:template>
  106. <xsl:template match="corpauthor" mode="slides.titlepage.recto.auto.mode">
  107. <div xsl:use-attribute-sets="slides.titlepage.recto.style">
  108. <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
  109. </div>
  110. </xsl:template>
  111. <xsl:template match="authorgroup" mode="slides.titlepage.recto.auto.mode">
  112. <div xsl:use-attribute-sets="slides.titlepage.recto.style">
  113. <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
  114. </div>
  115. </xsl:template>
  116. <xsl:template match="author" mode="slides.titlepage.recto.auto.mode">
  117. <div xsl:use-attribute-sets="slides.titlepage.recto.style">
  118. <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
  119. </div>
  120. </xsl:template>
  121. </xsl:stylesheet>