You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

protopage.xsl 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!--
  2. Copyright (c) 1999 - 2017 XMPP Standards Foundation
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. THE SOFTWARE.
  18. -->
  19. <!-- Author: stpeter -->
  20. <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
  21. <xsl:output method='html'/>
  22. <xsl:template match='/'>
  23. <html>
  24. <head>
  25. <title><xsl:value-of select='/xep/header/shortname'/></title>
  26. <link rel='stylesheet' type='text/css' href='/xmpp.css' />
  27. <link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
  28. <link>
  29. <xsl:attribute name='rel'><xsl:text>alternate</xsl:text></xsl:attribute>
  30. <xsl:attribute name='href'><xsl:text>http://xmpp.org/extensions/xep-</xsl:text><xsl:value-of select='/xep/header/number'/><xsl:text>.html</xsl:text></xsl:attribute>
  31. </link>
  32. <!-- BEGIN META TAGS FOR DUBLIN CORE -->
  33. <meta>
  34. <xsl:attribute name='name'><xsl:text>DC.Title</xsl:text></xsl:attribute>
  35. <xsl:attribute name='content'><xsl:value-of select='/xep/header/shortname'/></xsl:attribute>
  36. </meta>
  37. <meta>
  38. <xsl:attribute name='name'><xsl:text>DC.Publisher</xsl:text></xsl:attribute>
  39. <xsl:attribute name='content'>XMPP Standards Foundation</xsl:attribute>
  40. </meta>
  41. <meta>
  42. <xsl:attribute name='name'><xsl:text>DC.Date</xsl:text></xsl:attribute>
  43. <xsl:attribute name='content'><xsl:value-of select='/xep/header/revision/date'/></xsl:attribute>
  44. </meta>
  45. <!-- END META TAGS FOR DUBLIN CORE -->
  46. </head>
  47. <body>
  48. <h1><xsl:value-of select='/xep/header/shortname'/></h1>
  49. <p>This page provides information about the XML namespaces defined in
  50. <a>
  51. <xsl:attribute name='href'>
  52. <xsl:text>http://xmpp.org/extensions/xep-</xsl:text>
  53. <xsl:value-of select='/xep/header/number'/>
  54. <xsl:text>.html</xsl:text>
  55. </xsl:attribute>
  56. <xsl:text>XEP-</xsl:text><xsl:value-of select='/xep/header/number' />:<xsl:text> </xsl:text><xsl:value-of select='/xep/header/title' />
  57. </a>
  58. (part of the <a href="http://xmpp.org/extensions/">XEP series</a> published by the <a href="http://xmpp.org/xsf/">XMPP Standards Foundation</a>).</p>
  59. <xsl:variable name='schema.count' select='count(/xep/header/schemaloc)'/>
  60. <xsl:if test='$schema.count &gt; 0'>
  61. <p>The following XML schemas are available for the <xsl:value-of select='/xep/header/title' /> protocol:</p>
  62. <ul>
  63. <xsl:apply-templates select='/xep/header/schemaloc'/>
  64. </ul>
  65. </xsl:if>
  66. <p>Last Updated: <xsl:value-of select='/xep/header/revision/date'/></p>
  67. </body>
  68. </html>
  69. </xsl:template>
  70. <xsl:template match='schemaloc'>
  71. <xsl:variable name='this.url' select='url'/>
  72. <xsl:variable name='ns.count' select='count(ns)'/>
  73. <xsl:choose>
  74. <xsl:when test="$ns.count &gt; 0">
  75. <li><a href='{$this.url}'><xsl:value-of select='url'/></a></li>
  76. </xsl:when>
  77. <xsl:otherwise>
  78. <li><a href='{$this.url}'><xsl:value-of select='url'/></a></li>
  79. </xsl:otherwise>
  80. </xsl:choose>
  81. </xsl:template>
  82. </xsl:stylesheet>