]> git.meshlink.io Git - catta/blob - avahi-daemon/introspect.xsl
206de577fb8cababc851ca07968f87eb412bb549
[catta] / avahi-daemon / introspect.xsl
1 <?xml version="1.0" encoding="iso-8859-15"?>
2
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5   <!-- $Id$ -->
6
7   <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes"/>
8
9   <xsl:template match="/">
10     <html xmlns="http://www.w3.org/1999/xhtml">
11       <head>
12         <title>DBUS Introspection data</title>
13         <style type="text/css">
14           body { color: black; background-color: white } 
15           h1 { font-family: sans-serif }
16           ul { list-style-type: none; margin-bottom: 10px }
17           li { font-family: sans-serif }
18           .keyword { font-style: italic }
19           .type { font-weight: bold }
20           .symbol { font-family: monospace }
21           .interface { background: #efefef; padding: 10px; margin: 10px }
22         </style>
23       </head>
24       <body>
25         <xsl:for-each select="node/interface">
26           <div class="interface">
27             <h1>
28               <span class="keyword">interface</span><xsl:text> </xsl:text>
29               <span class="symbol"><xsl:value-of select="@name"/></span>
30             </h1>   
31             
32             <ul>
33
34             <xsl:apply-templates select="annotation"/> 
35
36             <xsl:for-each select="method|signal|property">
37               <li>
38                 <span class="keyword"><xsl:value-of select="name()"/></span>
39                 <xsl:text> </xsl:text>
40                 <span class="symbol"><xsl:value-of select="@name"/></span>
41                 
42                 <ul>
43                   <xsl:apply-templates select="annotation"/> 
44                   <xsl:for-each select="arg">
45                     <li>
46                       <span class="keyword">
47                         <xsl:choose>
48                           <xsl:when test="@direction != &quot;&quot;">
49                             <xsl:value-of select="@direction"/> 
50                           </xsl:when>
51                           <xsl:when test="name(..) = &quot;signal&quot;">
52                             out
53                           </xsl:when>
54                           <xsl:otherwise>
55                             in
56                           </xsl:otherwise>
57                         </xsl:choose>
58                       </span>
59
60                       <xsl:text> </xsl:text>
61                       
62                       <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
63                       <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
64                     </li>
65                   </xsl:for-each>
66                 </ul>
67
68               </li>
69             </xsl:for-each>
70
71             </ul>
72           </div>
73         </xsl:for-each>
74       </body>
75     </html>
76   </xsl:template>
77
78
79   <xsl:template match="annotation"> 
80     <li xmlns="http://www.w3.org/1999/xhtml">
81       <span class="keyword">annotation</span>
82       <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
83       <code><xsl:value-of select="@value"/></code>
84     </li>
85   </xsl:template>
86
87 </xsl:stylesheet>