summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/introspect.xsl
blob: 38b443c135ea184d5dcebd61f26de04c0c98588a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="iso-8859-15"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <!-- $Id$ -->

  <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"/>

  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>DBUS Introspection data</title>
        <style type="text/css">
          body { color: black; background-color: white } 
          h1 { font-family: sans-serif }
          ul { list-style-type: none; margin-bottom: 10px }
          li { font-family: sans-serif }
          .keyword { font-style: italic }
          .type { font-weight: bold }
          .symbol { font-family: monospace }
          .interface { padding: 10px; margin: 10px }
        </style>
      </head>
      <body>
        <xsl:for-each select="node/interface">
          <div class="interface">
            <h1>
              <span class="keyword">interface</span><xsl:text> </xsl:text>
              <span class="symbol"><xsl:value-of select="@name"/></span>
            </h1>   
            
            <ul>

            <xsl:apply-templates select="annotation"/> 

            <xsl:for-each select="method|signal|property">
              <li>
                <span class="keyword"><xsl:value-of select="name()"/></span>
                <xsl:text> </xsl:text>
                <span class="symbol"><xsl:value-of select="@name"/></span>
                
                <ul>
                  <xsl:apply-templates select="annotation"/> 
                  <xsl:for-each select="arg">
                    <li>
                      <span class="keyword">
                        <xsl:choose>
                          <xsl:when test="@direction != &quot;&quot;">
                            <xsl:value-of select="@direction"/> 
                          </xsl:when>
                          <xsl:when test="name(..) = &quot;signal&quot;">
                            out
                          </xsl:when>
                          <xsl:otherwise>
                            in
                          </xsl:otherwise>
                        </xsl:choose>
                      </span>

                      <xsl:text> </xsl:text>
                      
                      <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
                      <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
                    </li>
                  </xsl:for-each>
                </ul>

              </li>
            </xsl:for-each>

            </ul>
          </div>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>


  <xsl:template match="annotation"> 
    <li xmlns="http://www.w3.org/1999/xhtml">
      <span class="keyword">annotation</span>
      <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
      <code><xsl:value-of select="@value"/></code>
    </li>
  </xsl:template>

</xsl:stylesheet>