devhelp.xsl 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!-- Generate a Devhelp index from the Telepathy specification.
  2. The master copy of this stylesheet is in the Telepathy spec repository -
  3. please make any changes there.
  4. Copyright (C) 2006-2008 Collabora Limited
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. -->
  17. <xsl:stylesheet version="1.0"
  18. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  19. xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  20. <xsl:template match="/">
  21. <book xmlns="http://www.devhelp.net/book" title="Telepathy Specification"
  22. name="telepathy-spec" link="spec.html">
  23. <xsl:text>&#x000a;</xsl:text>
  24. <chapters>
  25. <xsl:text>&#x000a;</xsl:text>
  26. <xsl:apply-templates select="//interface" />
  27. </chapters>
  28. <xsl:text>&#x000a;</xsl:text>
  29. <functions>
  30. <xsl:text>&#x000a;</xsl:text>
  31. <xsl:apply-templates select="//method" />
  32. <xsl:apply-templates select="//signal" />
  33. <xsl:apply-templates select="//property" />
  34. <xsl:apply-templates select="//tp:enum" />
  35. <xsl:apply-templates select="//tp:simple-type" />
  36. <xsl:apply-templates select="//tp:mapping" />
  37. <xsl:apply-templates select="//tp:flags" />
  38. <xsl:apply-templates select="//tp:struct" />
  39. </functions>
  40. <xsl:text>&#x000a;</xsl:text>
  41. </book>
  42. </xsl:template>
  43. <xsl:template match="interface">
  44. <xsl:text> </xsl:text>
  45. <sub xmlns="http://www.devhelp.net/book" name="{@name}"
  46. link="{concat('spec.html#', @name)}" />
  47. <xsl:text>&#x000a;</xsl:text>
  48. </xsl:template>
  49. <xsl:template match="method">
  50. <xsl:text> </xsl:text>
  51. <keyword type="function" xmlns="http://www.devhelp.net/book" name="{@name}"
  52. link="spec.html#{../@name}.{@name}" />
  53. <xsl:text>&#x000a;</xsl:text>
  54. </xsl:template>
  55. <xsl:template match="signal | property">
  56. <xsl:text> </xsl:text>
  57. <keyword type="" xmlns="http://www.devhelp.net/book" name="{@name}"
  58. link="spec.html#{../@name}.{@name}" />
  59. <xsl:text>&#x000a;</xsl:text>
  60. </xsl:template>
  61. <xsl:template match="tp:simple-type">
  62. <xsl:text> </xsl:text>
  63. <keyword type="typedef" xmlns="http://www.devhelp.net/book" name="{@name}"
  64. link="spec.html#type-{@name}" />
  65. <xsl:text>&#x000a;</xsl:text>
  66. </xsl:template>
  67. <xsl:template match="tp:enum | tp:flags">
  68. <xsl:text> </xsl:text>
  69. <keyword type="enum" xmlns="http://www.devhelp.net/book" name="{@name}"
  70. link="spec.html#type-{@name}" />
  71. <xsl:text>&#x000a;</xsl:text>
  72. </xsl:template>
  73. <xsl:template match="tp:mapping | tp:struct">
  74. <xsl:text> </xsl:text>
  75. <keyword type="struct" xmlns="http://www.devhelp.net/book" name="{@name}"
  76. link="spec.html#type-{@name}" />
  77. <xsl:text>&#x000a;</xsl:text>
  78. </xsl:template>
  79. </xsl:stylesheet>