summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/introspect.xsl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-04 19:22:31 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-04 19:22:31 +0000
commit15222173a7419a6be92782a04ff92f8463cbf001 (patch)
tree7c3882d4284849831c47ccce8836fa3a01c60b85 /avahi-daemon/introspect.xsl
parentd59e7d4e59eac2e2e2e1a3be5b04a8b316e7032f (diff)
Add introspection XSL stylesheet
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@233 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-daemon/introspect.xsl')
-rw-r--r--avahi-daemon/introspect.xsl87
1 files changed, 87 insertions, 0 deletions
diff --git a/avahi-daemon/introspect.xsl b/avahi-daemon/introspect.xsl
new file mode 100644
index 0000000..206de57
--- /dev/null
+++ b/avahi-daemon/introspect.xsl
@@ -0,0 +1,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 { background: #efefef; 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>