Debian Codegraph @

doc/introspect.xsl

raw
1 <?xml version="1.0" encoding="ISO-8859-15"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
3
4 <!--
5 Copyright (C) 2005 Lennart Poettering.
6
7 SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later
8
9 Licensed under the Academic Free License version 2.1
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 -->
25
26 <!-- $Id$ -->
27
28 <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
29
30 <xsl:template match="/">
31 <html>
32 <head>
33 <title>DBUS Introspection data</title>
34 <style type="text/css">
35 body { color: black; background-color: white }
36 h1 { font-family: sans-serif }
37 ul { list-style-type: none; margin-bottom: 10px }
38 li { font-family: sans-serif }
39 .keyword { font-style: italic }
40 .type { font-weight: bold }
41 .symbol { font-family: monospace }
42 .interface { padding: 10px; margin: 10px }
43 </style>
44 </head>
45 <body>
46 <xsl:for-each select="node/interface">
47 <div class="interface">
48 <h1>
49 <span class="keyword">interface</span><xsl:text> </xsl:text>
50 <span class="symbol"><xsl:value-of select="@name"/></span>
51 </h1>
52
53 <ul>
54
55 <xsl:apply-templates select="annotation"/>
56
57 <xsl:for-each select="method|signal|property">
58 <li>
59 <span class="keyword"><xsl:value-of select="name()"/></span>
60 <xsl:text> </xsl:text>
61 <span class="symbol"><xsl:value-of select="@name"/></span>
62
63 <ul>
64 <xsl:apply-templates select="annotation"/>
65 <xsl:for-each select="arg">
66 <li>
67 <span class="keyword">
68 <xsl:choose>
69 <xsl:when test="@direction != &quot;&quot;">
70 <xsl:value-of select="@direction"/>
71 </xsl:when>
72 <xsl:when test="name(..) = &quot;signal&quot;">
73 out
74 </xsl:when>
75 <xsl:otherwise>
76 in
77 </xsl:otherwise>
78 </xsl:choose>
79 </span>
80
81 <xsl:text> </xsl:text>
82
83 <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
84 <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
85
86 <xsl:if test="annotation">
87 <ul>
88 <xsl:apply-templates select="annotation"/>
89 </ul>
90 </xsl:if>
91 </li>
92 </xsl:for-each>
93 </ul>
94
95 </li>
96 </xsl:for-each>
97
98 </ul>
99 </div>
100 </xsl:for-each>
101 </body>
102 </html>
103 </xsl:template>
104
105
106 <xsl:template match="annotation">
107 <li>
108 <span class="keyword">annotation</span><xsl:text> </xsl:text>
109 <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
110 <code><xsl:value-of select="@value"/></code>
111 </li>
112 </xsl:template>
113
114 </xsl:stylesheet>