lfs-mixed.xsl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns="http://www.w3.org/1999/xhtml"
  4. version="1.0">
  5. <!-- screen -->
  6. <xsl:template match="screen">
  7. <xsl:choose>
  8. <!-- Temporally hack -->
  9. <xsl:when test="child::* = userinput">
  10. <pre class="{name(.)}">
  11. <kbd class="command">
  12. <xsl:value-of select="."/>
  13. </kbd>
  14. </pre>
  15. </xsl:when>
  16. <xsl:otherwise>
  17. <pre class="{name(.)}">
  18. <xsl:apply-templates/>
  19. </pre>
  20. </xsl:otherwise>
  21. </xsl:choose>
  22. </xsl:template>
  23. <!-- variablelist -->
  24. <xsl:template match="variablelist">
  25. <div class="{name(.)}">
  26. <xsl:if test="title">
  27. <xsl:choose>
  28. <xsl:when test="@role = 'materials'">
  29. <h3>
  30. <xsl:value-of select="title"/>
  31. </h3>
  32. </xsl:when>
  33. <xsl:otherwise>
  34. <h4>
  35. <xsl:value-of select="title"/>
  36. </h4>
  37. </xsl:otherwise>
  38. </xsl:choose>
  39. </xsl:if>
  40. <dl>
  41. <xsl:if test="@role">
  42. <xsl:attribute name="class">
  43. <xsl:value-of select="@role"/>
  44. </xsl:attribute>
  45. </xsl:if>
  46. <xsl:apply-templates select="varlistentry"/>
  47. </dl>
  48. </div>
  49. </xsl:template>
  50. </xsl:stylesheet>