pr-d.xsl 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2004, 2005 IBM Corporation
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <xsl:stylesheet version="2.0"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  9. <xsl:import href="plugin:org.dita.xhtml:xsl/xslhtml/syntax-braces.xsl"/>
  10. <!-- programming-domain.ent domain: codeblock | codeph | var | kwd | synph | oper | delim | sep | repsep |
  11. option | parmname | apiname-->
  12. <xsl:template match="*[contains(@class, ' pr-d/codeblock ')]" name="topic.pr-d.codeblock">
  13. <xsl:apply-templates select="*[contains(@class, ' ditaot-d/ditaval-startprop ')]" mode="out-of-line"/>
  14. <xsl:call-template name="spec-title-nospace"/>
  15. <pre>
  16. <xsl:call-template name="commonattributes"/>
  17. <xsl:call-template name="setscale"/>
  18. <xsl:call-template name="setidaname"/>
  19. <code>
  20. <xsl:apply-templates/>
  21. </code>
  22. </pre>
  23. <xsl:apply-templates select="*[contains(@class, ' ditaot-d/ditaval-endprop ')]" mode="out-of-line"/>
  24. </xsl:template>
  25. <xsl:template match="*[contains(@class,' pr-d/codeph ')]" name="topic.pr-d.codeph">
  26. <code>
  27. <xsl:call-template name="commonattributes"/>
  28. <xsl:call-template name="setidaname"/>
  29. <xsl:apply-templates/>
  30. </code>
  31. </xsl:template>
  32. <xsl:template match="*[contains(@class,' pr-d/kwd ')]" name="topic.pr-d.kwd">
  33. <span class="kwd">
  34. <xsl:if test="(@importance='default')">
  35. <xsl:attribute name="class">defkwd</xsl:attribute>
  36. </xsl:if>
  37. <xsl:call-template name="commonattributes"/>
  38. <xsl:call-template name="setidaname"/>
  39. <xsl:apply-templates/>
  40. </span>
  41. </xsl:template>
  42. <xsl:template match="*[contains(@class,' pr-d/var ')]" name="topic.pr-d.var">
  43. <span class="var">
  44. <xsl:call-template name="commonattributes"/>
  45. <xsl:call-template name="setidaname"/>
  46. <xsl:apply-templates/>
  47. </span>
  48. </xsl:template>
  49. <xsl:template match="*[contains(@class,' pr-d/synph ')]" name="topic.pr-d.synph">
  50. <span class="synph">
  51. <xsl:call-template name="commonattributes"/>
  52. <xsl:call-template name="setidaname"/>
  53. <xsl:apply-templates/>
  54. </span>
  55. </xsl:template>
  56. <xsl:template match="*[contains(@class,' pr-d/oper ')]" name="topic.pr-d.oper">
  57. <span class="oper">
  58. <xsl:call-template name="commonattributes"/>
  59. <xsl:call-template name="setidaname"/>
  60. <xsl:apply-templates/>
  61. </span>
  62. </xsl:template>
  63. <xsl:template match="*[contains(@class,' pr-d/delim ')]" name="topic.pr-d.delim">
  64. <span class="delim">
  65. <xsl:call-template name="commonattributes"/>
  66. <xsl:call-template name="setidaname"/>
  67. <xsl:apply-templates/>
  68. </span>
  69. </xsl:template>
  70. <xsl:template match="*[contains(@class,' pr-d/sep ')]" name="topic.pr-d.sep">
  71. <span class="sep">
  72. <xsl:call-template name="commonattributes"/>
  73. <xsl:call-template name="setidaname"/>
  74. <xsl:apply-templates/>
  75. </span>
  76. </xsl:template>
  77. <xsl:template match="*[contains(@class,' pr-d/repsep ')]" name="topic.pr-d.repsep">
  78. <span class="repsep">
  79. <xsl:call-template name="commonattributes"/>
  80. <xsl:call-template name="setidaname"/>
  81. <xsl:apply-templates/>
  82. </span>
  83. </xsl:template>
  84. <xsl:template match="*[contains(@class,' pr-d/option ')]" name="topic.pr-d.option">
  85. <span class="option">
  86. <xsl:call-template name="commonattributes"/>
  87. <xsl:call-template name="setidaname"/>
  88. <xsl:apply-templates/>
  89. </span>
  90. </xsl:template>
  91. <xsl:template match="*[contains(@class,' pr-d/parmname ')]" name="topic.pr-d.parmname">
  92. <span class="parmname">
  93. <xsl:call-template name="commonattributes"/>
  94. <xsl:call-template name="setidaname"/>
  95. <xsl:apply-templates/>
  96. </span>
  97. </xsl:template>
  98. <xsl:template match="*[contains(@class,' pr-d/apiname ')]" name="topic.pr-d.apiname">
  99. <span class="apiname">
  100. <xsl:call-template name="commonattributes"/>
  101. <xsl:call-template name="setidaname"/>
  102. <xsl:apply-templates/>
  103. </span>
  104. </xsl:template>
  105. </xsl:stylesheet>