/pjo/trunk/ant/docbook/xsl/1.75.1/html/task.xsl

# · Extensible Stylesheet Language Transformations · 76 lines · 57 code · 19 blank · 0 comment · 0 complexity · ec2a967763b46a43ce83cf1bfe3f6fa2 MD5 · raw file

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. version="1.0">
  4. <!-- ********************************************************************
  5. $Id: task.xsl 8421 2009-05-04 07:49:49Z bobstayton $
  6. ********************************************************************
  7. This file is part of the XSL DocBook Stylesheet distribution.
  8. See ../README or http://docbook.sf.net/release/xsl/current/ for
  9. copyright and other information.
  10. ******************************************************************** -->
  11. <!-- ==================================================================== -->
  12. <xsl:template match="task">
  13. <xsl:variable name="param.placement"
  14. select="substring-after(normalize-space($formal.title.placement),
  15. concat(local-name(.), ' '))"/>
  16. <xsl:variable name="placement">
  17. <xsl:choose>
  18. <xsl:when test="contains($param.placement, ' ')">
  19. <xsl:value-of select="substring-before($param.placement, ' ')"/>
  20. </xsl:when>
  21. <xsl:when test="$param.placement = ''">before</xsl:when>
  22. <xsl:otherwise>
  23. <xsl:value-of select="$param.placement"/>
  24. </xsl:otherwise>
  25. </xsl:choose>
  26. </xsl:variable>
  27. <xsl:variable name="preamble"
  28. select="*[not(self::title
  29. or self::titleabbrev)]"/>
  30. <div>
  31. <xsl:apply-templates select="." mode="common.html.attributes"/>
  32. <xsl:call-template name="anchor"/>
  33. <xsl:if test="title and $placement = 'before'">
  34. <xsl:call-template name="formal.object.heading"/>
  35. </xsl:if>
  36. <xsl:apply-templates select="$preamble"/>
  37. <xsl:if test="title and $placement != 'before'">
  38. <xsl:call-template name="formal.object.heading"/>
  39. </xsl:if>
  40. </div>
  41. </xsl:template>
  42. <xsl:template match="task/title">
  43. <!-- nop -->
  44. </xsl:template>
  45. <xsl:template match="tasksummary">
  46. <xsl:call-template name="semiformal.object"/>
  47. </xsl:template>
  48. <xsl:template match="tasksummary/title"/>
  49. <xsl:template match="taskprerequisites">
  50. <xsl:call-template name="semiformal.object"/>
  51. </xsl:template>
  52. <xsl:template match="taskprerequisites/title"/>
  53. <xsl:template match="taskrelated">
  54. <xsl:call-template name="semiformal.object"/>
  55. </xsl:template>
  56. <xsl:template match="taskrelated/title"/>
  57. </xsl:stylesheet>