]> git.meshlink.io Git - catta/blob - avahi-daemon/introspect.xsl
Complete AVAHI_LOOKUP_NO_ADDRESS fix
[catta] / avahi-daemon / introspect.xsl
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   This file is part of avahi.
6
7   avahi is free software; you can redistribute it and/or modify it under
8   the terms of the GNU General Public License as published by the Free
9   Software Foundation; either version 2 of the License, or (at your
10   option) any later version.
11
12   avahi is distributed in the hope that it will be useful, but WITHOUT
13   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14   FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15   for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with avahi; if not, write to the Free Software Foundation,
19   Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 
20 -->
21
22 <!-- $Id$ -->
23
24 <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"/>
25
26 <xsl:template match="/">
27   <html>
28     <head>
29       <title>DBUS Introspection data</title>
30       <style type="text/css">
31         body { color: black; background-color: white } 
32         h1 { font-family: sans-serif }
33         ul { list-style-type: none; margin-bottom: 10px }
34         li { font-family: sans-serif }
35         .keyword { font-style: italic }
36         .type { font-weight: bold }
37         .symbol { font-family: monospace }
38         .interface { padding: 10px; margin: 10px }
39       </style>
40     </head>
41     <body>
42       <xsl:for-each select="node/interface">
43         <div class="interface">
44           <h1>
45             <span class="keyword">interface</span><xsl:text> </xsl:text>
46             <span class="symbol"><xsl:value-of select="@name"/></span>
47           </h1>   
48           
49           <ul>
50
51             <xsl:apply-templates select="annotation"/> 
52
53             <xsl:for-each select="method|signal|property">
54               <li>
55                 <span class="keyword"><xsl:value-of select="name()"/></span>
56                 <xsl:text> </xsl:text>
57                 <span class="symbol"><xsl:value-of select="@name"/></span>
58                 
59                 <ul>
60                   <xsl:apply-templates select="annotation"/> 
61                   <xsl:for-each select="arg">
62                     <li>
63                       <span class="keyword">
64                         <xsl:choose>
65                           <xsl:when test="@direction != &quot;&quot;">
66                             <xsl:value-of select="@direction"/> 
67                           </xsl:when>
68                           <xsl:when test="name(..) = &quot;signal&quot;">
69                             out
70                           </xsl:when>
71                           <xsl:otherwise>
72                             in
73                           </xsl:otherwise>
74                         </xsl:choose>
75                       </span>
76
77                       <xsl:text> </xsl:text>
78                       
79                       <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
80                       <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
81                     </li>
82                   </xsl:for-each>
83                 </ul>
84
85               </li>
86             </xsl:for-each>
87
88           </ul>
89         </div>
90       </xsl:for-each>
91     </body>
92   </html>
93 </xsl:template>
94
95
96 <xsl:template match="annotation"> 
97   <li>
98     <span class="keyword">annotation</span>
99     <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
100     <code><xsl:value-of select="@value"/></code>
101   </li>
102 </xsl:template>
103
104 </xsl:stylesheet>